Summary Table
Categories |
Total Count |
PII |
0 |
URL |
0 |
DNS |
0 |
EKL |
0 |
IP |
0 |
PORT |
0 |
VsID |
0 |
CF |
0 |
AI |
0 |
VPD |
0 |
PL |
0 |
Other |
0 |
File Content
const express = require('express');
const router = express.Router();
const rest = require('./../../rest/fpps-rest');
router.get('/authParams', (req, res) => {
rest
.getResource(
process.env.FPPS_END_POINT_BASE_URI + process.env.AUTH_INIT_PARAMS
)
.then(data => {
res.status(data.response.statusCode).json(data.responseBody);
});
});
router.post('/roles', (req, res) => {
let userName = req.body.userName;
rest
.fppsGetResource(
`${process.env.FPPS_END_POINT_BASE_URI}${
process.env.USER_ROLE
}?userName=${userName}`
)
.then(data => {
res.status(data.response.statusCode).json(data.responseBody);
});
});
router.get('/users', (req, res) => {
//res.cookie('testCookie',Math.floor((Math.random() * 10) + 1), {secure: false, httpOnly: false })
rest
.getResource(process.env.END_POINT_BASE_URI + process.env.USERS)
.then(data => {
res.status(data.response.statusCode).json(data.responseBody);
});
});
router.get('/refreshStats/:userName', (req, res) => {
const userName = req.params.userName;
rest
.getResource(
process.env.END_POINT_BASE_URI +
process.env.REFRESH_STATS +
`/${userName}`
)
.then(data => {
res.status(data.response.statusCode).json(data.responseBody);
});
});
module.exports = router;