forked from noxious/server
(WIP) Added pw reset token row, added checks to reset function
This commit is contained in:
@ -7,6 +7,7 @@ class config {
|
||||
static REDIS_URL: string = process.env.REDIS_URL || 'redis://@127.0.0.1:6379/4'
|
||||
static HOST: string = process.env.HOST || '0.0.0.0'
|
||||
static PORT: number = process.env.PORT ? parseInt(process.env.PORT) : 6969
|
||||
static CLIENT_URL: string = process.env.CLIENT_URL ? process.env.CLIENT_URL : 'https://sylvan.quest/'
|
||||
static JWT_SECRET: string = process.env.JWT_SECRET || 'secret'
|
||||
|
||||
static ALLOW_DIAGONAL_MOVEMENT: boolean = process.env.ALLOW_DIAGONAL_MOVEMENT === 'true'
|
||||
|
@ -73,9 +73,9 @@ async function addHttpRoutes(app: Application) {
|
||||
}
|
||||
|
||||
const userService = new UserService()
|
||||
const user = await userService.resetPassword( email )
|
||||
const sentEmail = await userService.resetPassword( email )
|
||||
|
||||
if (user) {
|
||||
if (sentEmail) {
|
||||
return res.status(200).json({ message: 'Email has been sent' })
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user