mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
feat: store graph in session manager
This commit is contained in:
1 parent
1c017c98c7
commit
3dae9e8552
4 files changed
+32
-26
No files matched your search
@@ -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 }
|
||||
|
||||
Reference in new issue
Block a user