Implement a command-line interface to the running webserver, and a way to get/set...
[ndcode_site.git] / api / account / change_details / set.json.jst
index dac0b61..5e61e5e 100644 (file)
@@ -26,7 +26,9 @@ return async env => {
       let transaction = await env.site.database.Transaction()
       try {
         // initialize env.session_key, set cookie in env.response
-        let session = await session_cookie(env, transaction)
+        await session_cookie(env, transaction)
+        if (env.signed_in_as === null)
+          throw new Problem('Unauthorized', 'Please sign in first.', 401)
 
         let account = await (
           await (