-let logjson = (await import('@ndcode/logjson')).default
let XDate = require('xdate')
return async env => {
let account = await (
await root.get('accounts', {})
).get(env.signed_in_as)
- if (
- !await logjson.logjson_to_json(
- await account.get('administrator')
- )
- )
+ if (!await account.get_json('administrator'))
throw new Problem('Unauthorized', 'Not administrator.', 401)
- root.set('globals', transaction.json_to_logjson(globals))
+ root.set_json('globals', globals)
await transaction.commit()
}
catch (error) {