Merge pull request #504 from mz8i/fix/forgotten-password-error
Fix forgotten password error
This commit is contained in:
commit
a8ae8510b2
@ -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
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user