Major refactoring of get_session(), get_account(), get_nodemailer(), introduces ...
[ndcode_site.git] / api / account / change_details / set.json.jst
index 0000541..109e84e 100644 (file)
@@ -25,11 +25,10 @@ return async env => {
 
       let transaction = await env.site.database.Transaction()
       try {
-        let account = await get_account(
-          env,
-          transaction,
-          await get_session(env, transaction)
-        )
+        let root = await transaction.get({})
+        let session = await get_session(env, root)
+
+        let account = await get_account(root, session)
         if (account === undefined)
           throw new Problem('Unauthorized', 'Please sign in first.', 401)