const express = require("express");
const router = express.Router();
const leaveApplicationService = require("./leaveApplication.service");
const authorize = require("../../../../middlewares/authorize-sapps");

router.post("/", authorize(), getAll);

module.exports = router;

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