Added contact to login, added some auth exceptions

This commit is contained in:
MrFry 2020-04-08 19:24:17 +02:00
parent 143894288a
commit a6d260f6af
6 changed files with 26 additions and 6 deletions

View file

@ -72,7 +72,11 @@ function GetApp () {
exceptions: [
'/favicon.ico',
'/login',
'/getveteranpw'
'/getveteranpw',
'/postfeedbackfile',
'/postfeedback',
'/fosuploader',
'/badtestsender'
]
}))
app.use(express.static('public'))
@ -575,6 +579,7 @@ function GetApp () {
}
function IncrementAvaiblePWs () {
// FIXME: check this if this is legit and works
const users = dbtools.SelectAll(userDB, 'users')
const today = new Date()
const getDayDiff = (dateString) => {
@ -593,6 +598,7 @@ function GetApp () {
}
if (dayDiff % addPWPerDay === 0) {
logger.Log(`Incrementing avaible PW-s for user #${u.id}`, logger.GetColor('cyan'))
dbtools.Update(userDB, 'users', {
avaiblePWRequests: u.avaiblePWRequests + 1
}, {