let transaction = await env.site.database.Transaction()
try {
- let root = await transaction.get({})
+ let root = await transaction.get()
let session = await get_session(env, root)
let account = await get_account(root, session)
- if (account === undefined)
- throw new jst_server.Problem(
- 'Unauthorized',
- 'Please sign in first.',
- 401
- )
-
if (old_password !== await account.get_json('password'))
throw new jst_server.Problem(
'Incorrect password',