1 let jst_server = (await import('@ndcode/jst_server')).default
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')
12 async nodemailers => {
13 // do not bother trying to coerce and/or validate
14 // too complex and nested (do it when we have an automated routine)
16 let transaction = await env.site.database.Transaction()
18 let root = await transaction.get()
19 let session = await get_session(env, root)
21 let account = await get_account(root, session)
22 if (!await account.get_json('administrator'))
23 throw new jst_server.Problem(
29 root.set_json('nodemailers', nodemailers)
30 await transaction.commit()
33 transaction.rollback()