@@ -3,7 +3,7 @@ const config = require("../config")
|
||||
module.exports = (req, res, next) => {
|
||||
if (res.marko) {
|
||||
res.markoAsync = async(template, input) => {
|
||||
const locals = Object.assign((res.locals || {}), input)
|
||||
const locals = Object.assign({}, (res.locals || {}), input)
|
||||
|
||||
try {
|
||||
for (const key in locals) {
|
||||
@@ -12,7 +12,7 @@ module.exports = (req, res, next) => {
|
||||
locals[key] = await value
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (locals.user.permissions != null) {
|
||||
locals.user.permissions = await locals.user.permissions
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user