story-content: Added remove story modal, added annotations
This commit is contained in:
@@ -3,11 +3,15 @@ module.exports = (req, res, next) => {
|
||||
res.markoAsync = async(template, input) => {
|
||||
const locals = Object.assign((res.locals || {}), input)
|
||||
|
||||
for (const key in locals) {
|
||||
const value = locals[key]
|
||||
if (value instanceof Promise) {
|
||||
locals[key] = await value
|
||||
try {
|
||||
for (const key in locals) {
|
||||
const value = locals[key]
|
||||
if (value instanceof Promise) {
|
||||
locals[key] = await value
|
||||
}
|
||||
}
|
||||
} catch(err) {
|
||||
return res.status(404).json(err)
|
||||
}
|
||||
|
||||
return res.marko(template, locals)
|
||||
|
||||
Reference in New Issue
Block a user