let jst_server = (await import('@ndcode/jst_server')).default
-let XDate = require('xdate')
return async env => {
let get_account = await _require('/_lib/get_account.jst')
async () => {
let transaction = await env.site.database.Transaction()
try {
- let root = await transaction.get({})
+ let root = await transaction.get()
let session = await get_session(env, root)
let account = await get_account(root, session)
- if (account === undefined)
- throw new jst_server.Problem(
- 'Unauthorized',
- 'Please sign in first.',
- 401
- )
if (!await account.get_json('administrator'))
throw new jst_server.Problem(
'Unauthorized',