Adding fixes that lets us pull a myster in the db into a json file
This commit is contained in:
@@ -397,6 +397,14 @@ app.delete('/api/admin/npcs/:id/poses/:poseKey', requireAdmin, async (req, res,
|
||||
app.get('/api/admin/level-templates', requireAdmin, async (_req, res, next) => {
|
||||
try { res.json(await storyGraph.listLevelTemplates()) } catch (error) { next(error) }
|
||||
})
|
||||
// Read a frozen template version's board (exhibits, goals, rules) for the mystery:pull
|
||||
// exporter — read-only, so no editing gate.
|
||||
app.get('/api/admin/level-templates/:versionId/export', requireAdmin, async (req, res, next) => {
|
||||
try {
|
||||
const board = await levels.getTemplateBoard(String(req.params.versionId))
|
||||
board ? res.json(board) : res.status(404).json({ error: 'Template version not found' })
|
||||
} catch (error) { next(error) }
|
||||
})
|
||||
app.get('/api/admin/mysteries/:id/graph', requireAdmin, async (req, res, next) => {
|
||||
try {
|
||||
const graph = await storyGraph.getGraph(String(req.params.id))
|
||||
|
||||
Reference in New Issue
Block a user