const express = require("express");
const router = express.Router();
const authorize = require("../../../../middlewares/authorize-sapps");
const designationService = require("./designation.service");
const redisClient = require('../../../../redisClient');

router.post('/', authorize(), getDesignationHierarchy);

module.exports = router;

function getDesignationHierarchy(req, res, next) {
    designationService
        .getDesignationHierarchy(req.body)
        .then((result) => res.json(result))
        .catch(next);
}
