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/rest');
const authGuard = require('./../../../auth/authGuardMiddleware');
router.post('/roles', authGuard, (req, res) => {
rest
.postResource(
process.env.END_POINT_BASE_URI + process.env.USER_ADMIN_GET_ROLES,
req.body
)
.then(data => {
res.status(data.response.statusCode).json(data.responseBody);
});
});
router.post('/assignedRoles', authGuard, (req, res) => {
rest
.postResource(
process.env.END_POINT_BASE_URI +
process.env.SEARCH_MODIFY_ASSIGNEDROLES,
JSON.stringify(req.body)
)
.then(data => {
res.status(data.response.statusCode).json(data.responseBody);
});
});
router.get('/facilities', authGuard, (req, res) => {
rest
.getResource(
process.env.END_POINT_BASE_URI +
process.env.USER_ADMIN_GET_FACILITIES,
req.body.body
)
.then(data => {
res.status(data.response.statusCode).json(data.responseBody);
});
});
router.post('/assignedFacilities', authGuard, (req, res) => {
rest
.postResource(
process.env.END_POINT_BASE_URI +
process.env.SEARCH_MODIFY_ASSIGNEDFACILITIES,
JSON.stringify(req.body)
)
.then(data => {
res.status(data.response.statusCode).json(data.responseBody);
});
});
router.put('/modifyUserDetails', authGuard, (req, res) => {
rest
.putResource(
process.env.END_POINT_BASE_URI +
process.env.SEARCH_MODIFY_UPDATE_USER_DETAILS,
req.body
)
.then(data => {
res.status(data.response.statusCode).json(data.responseBody);
});
});
router.put('/modifyUserAssignments', authGuard, (req, res) => {
rest
.putResource(
process.env.END_POINT_BASE_URI +
process.env.SEARCH_MODIFY_UPDATE_USER_ASSIGNMENTS,
req.body
)
.then(data => {
res.status(data.response.statusCode).json(data.responseBody);
});
});
module.exports = router;