mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
feat: add exceptions to stage
This commit is contained in:
1 parent
56d96cf7a0
commit
66ce015f0e
6 files changed
+86
-1
No files matched your search
@@ -35,6 +35,26 @@ conditionSchema.add({
|
||||
not: conditionSchema,
|
||||
})
|
||||
|
||||
const exceptionSchema = new Schema({
|
||||
condition: {
|
||||
type: conditionSchema,
|
||||
required: false,
|
||||
},
|
||||
catchAll: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
responses: {
|
||||
type: [responseSchema],
|
||||
required: true,
|
||||
},
|
||||
hints: {
|
||||
type: [String],
|
||||
required: true,
|
||||
},
|
||||
})
|
||||
|
||||
const stageSchema = new Schema({
|
||||
id: {
|
||||
type: String,
|
||||
@@ -66,6 +86,10 @@ const stageSchema = new Schema({
|
||||
type: [String],
|
||||
required: true,
|
||||
},
|
||||
exceptions: {
|
||||
type: [exceptionSchema],
|
||||
required: true,
|
||||
},
|
||||
})
|
||||
|
||||
const Quest = model(
|
||||
|
||||
Reference in new issue
Block a user