1 let XDate = require('xdate')
4 let get_account = await _require('/_lib/get_account.jst')
5 let get_session = await _require('/_lib/get_session.jst')
6 let post_request = await _require('/_lib/post_request.jst')
7 let Problem = await _require('/_lib/Problem.jst')
14 let transaction = await env.site.database.Transaction()
16 let root = await transaction.get({})
17 let session = await get_session(env, root)
19 let account = await get_account(root, session)
20 if (account === undefined)
21 throw new Problem('Unauthorized', 'Please sign in first.', 401)
22 if (!await account.get_json('administrator'))
23 throw new Problem('Unauthorized', 'Not administrator.', 401)
25 return /*await*/ root.get_json('nodemailer', {})
28 transaction.rollback()