Message from JavaScript discussions

October 2020

— It’s kind of refactored

— 

It might be super optimized already, but it's probably a good idea to make note of files you feel are pain points

— So when you have no new features to implement you can go work on that

— Crap that’s right thanks lol

— Https://djaytechdiary.com/dockerize-your-next-js-application

— Hey guys i need one javascript class problem solution.

— Then create it, or send your problem here which shouldn't be "idk how to write a class"

— Hi

— Plz who know how to create a game

— Call Gabe Newell

— Exports.reset_password = async (req, res) => {
try {
const { token } = req.params
if (!token) {
return res.status(404).json({
status: 'error',
message: 'Link not provided or Link has expired'
})
}
const verifyToken = jwt.verify(token, TOKEN_SECRET)
if (!verifyToken) {
return res.status(401).json({
status: 'error',
message: 'Authorization failed'
})
}
const user = await User.findOne({
where: {
resetToken: verifyToken
}
})
if (!user) {
return res.status(401).json({
status: 'error',
message: 'User not found'
})
}
const updatePassword = await bcrypt.hash(req.body.password, 10)
await user.update({
password: updatePassword,
resetToken: null
}, {
where: {
password: user.password,
resetToken: user.resetToken
}
})
return res.status(201).json({
status: 'success',
message: 'You have successfully updated your password.'
})
} catch (error) {
return res.status(500).json({
status: 'error',
message: error.message
})
}
};


What is it I'm doing wrong?
When I send the request, I don't get any errors or response. It just keeps on loading

Message permanent page

— Which web framework do you use? Express, Fastify or smth else?