bcgov/common-object-management-service

View on GitHub
app/src/routes/v1/user.js

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
const router = require('express').Router();

const { userValidator } = require('../../validators');
const { userController } = require('../../controllers');
const { checkAppMode } = require('../../middleware/authorization');
const { requireSomeAuth } = require('../../middleware/featureToggle');

router.use(checkAppMode);
router.use(requireSomeAuth);

/** Search for users */
router.get('/', userValidator.searchUsers, (req, res, next) => {
  userController.searchUsers(req, res, next);
});

/** List all identity providers */
router.get('/idpList', userValidator.listIdps, (req, res, next) => {
  userController.listIdps(req, res, next);
});

module.exports = router;