From 96b4a73573f613a6be14c1e6fff24c83da77ce47 Mon Sep 17 00:00:00 2001 From: Maciej Ziarkowski Date: Thu, 14 Nov 2019 16:16:20 +0000 Subject: [PATCH 1/2] Add await to catch errors in user service --- app/src/api/services/user.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/api/services/user.ts b/app/src/api/services/user.ts index c6cbc74e..0eba9e3f 100644 --- a/app/src/api/services/user.ts +++ b/app/src/api/services/user.ts @@ -106,7 +106,7 @@ async function getUserById(id: string) { async function getUserByEmail(email: string) { try { - return db.one( + return await db.one( `SELECT user_id, username, email FROM @@ -123,7 +123,7 @@ async function getUserByEmail(email: string) { async function getNewUserAPIKey(id: string) { try{ - return db.one( + return await db.one( `UPDATE users SET From e833c4dd3b666bcb4c01d316319b6b88295757a0 Mon Sep 17 00:00:00 2001 From: Maciej Ziarkowski Date: Thu, 14 Nov 2019 16:17:05 +0000 Subject: [PATCH 2/2] Amend forgotten password email send confirmation --- app/src/frontend/user/forgotten-password.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/frontend/user/forgotten-password.tsx b/app/src/frontend/user/forgotten-password.tsx index 678132e4..c11bbe61 100644 --- a/app/src/frontend/user/forgotten-password.tsx +++ b/app/src/frontend/user/forgotten-password.tsx @@ -62,7 +62,7 @@ export default class ForgottenPassword extends React.Component<{}, ForgottenPass {this.state.success ? - `A password reset link has been sent to ${this.state.emailUsed}. Please check your inbox.` : + `If the email address is registered on Colouring London, a password reset link will be sent to ${this.state.emailUsed}. Please check your inbox.` : null }