Merge pull request #504 from mz8i/fix/forgotten-password-error

Fix forgotten password error
This commit is contained in:
Maciej Ziarkowski 2019-11-14 16:33:52 +00:00 committed by GitHub
commit a8ae8510b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -62,7 +62,7 @@ export default class ForgottenPassword extends React.Component<{}, ForgottenPass
<ErrorBox msg={this.state.error} />
<InfoBox msg="">
{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
}
</InfoBox>