Add /_lib/get_globals.jst
[ndcode_site.git] / api / feedback.json.jst
index e13452c..79a26bd 100644 (file)
@@ -26,11 +26,14 @@ return async env => {
         // initialize env.session_key, set cookie in env.response
         await get_session(env, transaction)
 
-        let root = await transaction.get({})
         nodemailer_feedback = nodemailer.createTransport(
-          await (await root.get('nodemailer')).get_json('feedback')
+          await (
+            await (
+              await transaction.get({})
+            ).get('nodemailer')
+          ).get_json('feedback')
         )
-        let globals = await root.get('globals')
+        let globals = await get_globals(env, transaction)
         feedback_from = await globals.get_json('feedback_from')
         feedback_to = await globals.get_json('feedback_to')