mirror of
https://github.com/OpenSquawk/OpenSquawk
synced 2026-08-08 10:41:49 +08:00
Add session timeline logging and admin sessions view
This commit is contained in:
@@ -59,6 +59,14 @@ export default defineEventHandler(async (event) => {
|
||||
flow.phases = phases
|
||||
}
|
||||
|
||||
if (typeof body.entryMode === 'string') {
|
||||
flow.entryMode = body.entryMode === 'linear' ? 'linear' : 'parallel'
|
||||
}
|
||||
|
||||
if (typeof body.isMain === 'boolean') {
|
||||
flow.isMain = body.isMain
|
||||
}
|
||||
|
||||
if (body.variables && typeof body.variables === 'object') {
|
||||
flow.variables = body.variables
|
||||
flow.markModified('variables')
|
||||
@@ -145,6 +153,13 @@ export default defineEventHandler(async (event) => {
|
||||
|
||||
await flow.save()
|
||||
|
||||
if (flow.isMain) {
|
||||
await DecisionFlow.updateMany(
|
||||
{ _id: { $ne: flow._id } },
|
||||
{ $set: { isMain: false } }
|
||||
)
|
||||
}
|
||||
|
||||
const data = await getFlowWithNodes(slug)
|
||||
return data
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user