Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
beckpaul committed Dec 3, 2023
1 parent b8667bd commit 570a1d3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
26 changes: 13 additions & 13 deletions src/backend/routes/views/account/get/confirmPasswordReset.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,26 @@ exports = module.exports = function (req, res) {

// Ensure token and username are present
const validateParamPresence = (token, username) => {
if (!token || !username) {
return 'Invalid request'
} else {
return null
}
if (!token || !username) {
return 'Invalid request'
} else {
return null
}
}

const errorMsg = validateParamPresence(req.query.username, req.query.token)

if (errorMsg) {
flash = {}
flash.class = 'alert-danger'
flash.messages = [{ msg: errorMsg}]
flash.type = 'Error!'
const flash = {}
flash.class = 'alert-danger'
flash.messages = [{ msg: errorMsg }]
flash.type = 'Error!'

const buff = Buffer.from(JSON.stringify(flash))
const data = buff.toString('base64')
const buff = Buffer.from(JSON.stringify(flash))
const data = buff.toString('base64')

return overallRes.redirect('/account/requestPasswordReset?flash=' + data)
return overallRes.redirect('/account/requestPasswordReset?flash=' + data)
} else {
res.render('account/confirmPasswordReset')
res.render('account/confirmPasswordReset')
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ exports = module.exports = async function (req, res) {

res.render('account/requestPasswordReset', {
section: 'account',
flash: flash,
flash,
steamReset: response.data.steamUrl,
formData,
recaptchaSiteKey: appConfig.recaptchaKey
Expand Down

0 comments on commit 570a1d3

Please sign in to comment.