mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
feat: integrate filegraph
This commit is contained in:
1 parent
b3ed0e646e
commit
fba92dad46
4 files changed
+13
-11
No files matched your search
@@ -58,16 +58,18 @@ export const newCommand = asyncHandler(async (req: Request, res: Response) => {
|
||||
|
||||
if (gameSession.isFinished()) {
|
||||
await finishSession(session)
|
||||
} else {
|
||||
await session.save()
|
||||
}
|
||||
pushToSession(session.id, 'update', {
|
||||
responses: gameSession.getResponses(),
|
||||
tasks: gameSession.getTasks(),
|
||||
status: session.status,
|
||||
graphUpdate: command.params,
|
||||
})
|
||||
}
|
||||
if (command.params) {
|
||||
session.graph = gameSession.getGraph()
|
||||
pushToSession(session.id, 'graph', command.params)
|
||||
}
|
||||
await session.save()
|
||||
|
||||
res.status(200).end()
|
||||
})
|
||||
Reference in new issue
Block a user