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) {
|
async function getUserByEmail(email: string) {
|
||||||
try {
|
try {
|
||||||
return db.one(
|
return await db.one(
|
||||||
`SELECT
|
`SELECT
|
||||||
user_id, username, email
|
user_id, username, email
|
||||||
FROM
|
FROM
|
||||||
@ -123,7 +123,7 @@ async function getUserByEmail(email: string) {
|
|||||||
|
|
||||||
async function getNewUserAPIKey(id: string) {
|
async function getNewUserAPIKey(id: string) {
|
||||||
try{
|
try{
|
||||||
return db.one(
|
return await db.one(
|
||||||
`UPDATE
|
`UPDATE
|
||||||
users
|
users
|
||||||
SET
|
SET
|
||||||
|
@ -62,7 +62,7 @@ export default class ForgottenPassword extends React.Component<{}, ForgottenPass
|
|||||||
<ErrorBox msg={this.state.error} />
|
<ErrorBox msg={this.state.error} />
|
||||||
<InfoBox msg="">
|
<InfoBox msg="">
|
||||||
{this.state.success ?
|
{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
|
null
|
||||||
}
|
}
|
||||||
</InfoBox>
|
</InfoBox>
|
||||||
|
Loading…
Reference in New Issue
Block a user