From: Nick Downing Date: Thu, 27 Jan 2022 11:05:36 +0000 (+1100) Subject: Fix missing awaits on transaction.commit() X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?p=ndcode_site.git;a=commitdiff_plain;h=8c6cdd3011ce2ae7cb274baabf2d719e07903958 Fix missing awaits on transaction.commit() --- diff --git a/contact/index.html.jst b/contact/index.html.jst index d52613c..df384b5 100644 --- a/contact/index.html.jst +++ b/contact/index.html.jst @@ -20,7 +20,8 @@ return async env => { contact_draft = await session.get_json('contact_draft') if (contact_draft === undefined || env.now >= contact_draft.expires) contact_draft = null - transaction.commit() + + await transaction.commit() } catch (error) { transaction.rollback() diff --git a/my_account/index.html.jst b/my_account/index.html.jst index 452516d..d03c303 100644 --- a/my_account/index.html.jst +++ b/my_account/index.html.jst @@ -39,7 +39,7 @@ return async env => { if (change_details_draft === undefined || env.now >= change_details_draft.expires) change_details_draft = null - transaction.commit() + await transaction.commit() } catch (error) { transaction.rollback() diff --git a/my_account/password_reset/index.html.jst b/my_account/password_reset/index.html.jst index 55263ba..1ed05fa 100644 --- a/my_account/password_reset/index.html.jst +++ b/my_account/password_reset/index.html.jst @@ -14,7 +14,7 @@ return async env => { let root = await transaction.get({}) let session = await get_session(env, root) placeholder = await get_placeholder(env, session) - transaction.commit() + await transaction.commit() } catch (error) { transaction.rollback() diff --git a/my_account/send_verification_email/index.html.jst b/my_account/send_verification_email/index.html.jst index b55ecce..55d3b11 100644 --- a/my_account/send_verification_email/index.html.jst +++ b/my_account/send_verification_email/index.html.jst @@ -14,7 +14,7 @@ return async env => { let root = await transaction.get({}) let session = await get_session(env, root) placeholder = await get_placeholder(env, session) - transaction.commit() + await transaction.commit() } catch (error) { transaction.rollback() diff --git a/my_account/sign_up/index.html.jst b/my_account/sign_up/index.html.jst index 5dc8da2..3ce5eae 100644 --- a/my_account/sign_up/index.html.jst +++ b/my_account/sign_up/index.html.jst @@ -23,7 +23,8 @@ return async env => { sign_up_draft = await session.get_json('sign_up_draft') if (sign_up_draft === undefined || env.now >= sign_up_draft.expires) sign_up_draft = null - transaction.commit() + + await transaction.commit() } catch (error) { transaction.rollback() diff --git a/my_account/verify_password/index.html.jst b/my_account/verify_password/index.html.jst index 9615cfd..a9f46bd 100644 --- a/my_account/verify_password/index.html.jst +++ b/my_account/verify_password/index.html.jst @@ -14,7 +14,7 @@ return async env => { let root = await transaction.get({}) let session = await get_session(env, root) placeholder = await get_placeholder(env, session) - transaction.commit() + await transaction.commit() } catch (error) { transaction.rollback()