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