mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
feat: send response to frontend
This commit is contained in:
1 parent
fb69cb4e10
commit
88ee8f2cc3
8 files changed
+46
-35
No files matched your search
@@ -25,6 +25,7 @@ function sessionDetail(session: ISession) {
|
||||
...sessionSummary(session),
|
||||
hints: session.hints,
|
||||
tasks: session.tasks,
|
||||
responses: session.responses,
|
||||
graph: session.graph,
|
||||
}
|
||||
}
|
||||
@@ -55,6 +56,7 @@ export const createSession = asyncHandler(
|
||||
export const getSessionById = asyncHandler(
|
||||
async (req: Request, res: Response) => {
|
||||
const { sessionId } = matchedData(req)
|
||||
console.log(sessionId)
|
||||
const session = await Session.findOne({
|
||||
_id: sessionId,
|
||||
user: (req.user as Express.ExistingUser).id,
|
||||
|
||||
Reference in new issue
Block a user