feat: store graph in session manager

This commit is contained in:
wancat committed 2023-08-29 14:28:09 +08:00
1 parent 1c017c98c7
commit 3dae9e8552
4 files changed
+32 -26

No files matched your search

+8 -2
View File
@@ -4,7 +4,10 @@ import { FileNode } from '@linux-odyssey/file-graph'
const nodeSchema = new Schema({
path: String,
type: String,
discovered: Boolean,
discovered: {
type: Boolean,
default: false,
},
})
nodeSchema.add({
@@ -41,7 +44,10 @@ const Session = model(
hints: [String],
graph: {
type: nodeSchema,
default: new FileNode({ path: '/', name: '/', type: 'folder' }),
default: new FileNode({
path: '/',
type: 'folder',
}),
},
},
{ timestamps: true }