mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Added contact to login, added some auth exceptions
This commit is contained in:
parent
143894288a
commit
a6d260f6af
6 changed files with 26 additions and 6 deletions
|
@ -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
|
||||
}, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue