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
@@ -1,5 +1,7 @@
|
||||
import { model, Schema, Types } from 'mongoose'
|
||||
|
||||
import { IResponse, responseSchema } from './response.js'
|
||||
|
||||
export interface INode {
|
||||
path: string
|
||||
type: string
|
||||
@@ -53,6 +55,7 @@ export interface ISession {
|
||||
lastActivityAt: Date
|
||||
tasks: ITask[]
|
||||
hints: string[][]
|
||||
responses: IResponse[][]
|
||||
graph: INode
|
||||
}
|
||||
|
||||
@@ -85,6 +88,11 @@ export const Session = model<ISession>(
|
||||
},
|
||||
tasks: [taskSchema],
|
||||
hints: [[String]],
|
||||
responses: {
|
||||
type: [[responseSchema]],
|
||||
required: true,
|
||||
default: [],
|
||||
},
|
||||
graph: {
|
||||
type: nodeSchema,
|
||||
default: {
|
||||
|
||||
Reference in new issue
Block a user