mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Added get avaible pws endpoint
This commit is contained in:
parent
dfe931bd6f
commit
fe580747d6
2 changed files with 17 additions and 1 deletions
|
@ -116,6 +116,22 @@ function GetApp () {
|
||||||
|
|
||||||
// -------------------------------------------------------------
|
// -------------------------------------------------------------
|
||||||
|
|
||||||
|
app.get('/avaiblePWS', (req, res) => {
|
||||||
|
logger.LogReq(req)
|
||||||
|
|
||||||
|
const user = req.session.user
|
||||||
|
|
||||||
|
res.json({
|
||||||
|
result: 'success',
|
||||||
|
userCreated: user.created,
|
||||||
|
avaiblePWS: user.avaiblePWRequests,
|
||||||
|
requestedPWS: user.pwRequestCount,
|
||||||
|
maxPWCount: maxPWCount,
|
||||||
|
daysAfterUserGetsPWs: daysAfterUserGetsPWs,
|
||||||
|
addPWPerDay: addPWPerDay
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
app.post('/getpw', function (req, res) {
|
app.post('/getpw', function (req, res) {
|
||||||
logger.LogReq(req)
|
logger.LogReq(req)
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 0e8f6cd2d90ecae8d25f88729a5d3c23ce9d715b
|
Subproject commit 83ff9576e7e44d4acf15a925342aea668ce0f008
|
Loading…
Add table
Add a link
Reference in a new issue