/var/www/p4ela.kz/server/delivery/api/routes
Edit: /var/www/p4ela.kz/server/delivery/api/routes/branch.router.js (2029B)
const BranchController = require('../controllers/branch.controller')
const auth = require('../middleware/auth')
module.exports = ({ router, db }) => {
const controller = new BranchController({ db })
router.get('/api/branch/shift/list', auth, controller.ShiftList)
router.post('/api/branch/shift/close', auth, controller.ShiftClose)
router.post('/api/branch/shift/open', auth, controller.ShiftOpen)
router.get('/api/branch/list', auth, controller.List)
router.get('/api/branch/list_by_area', controller.ListByArea)
router.get('/api/branch/details/:uid', auth, controller.Details)
router.post('/api/branch/create', auth, controller.Create)
router.post('/api/branch/edit', auth, controller.Edit)
router.post('/api/branch/delete', auth, controller.Delete)
router.get('/api/branch/users', auth, controller.Users)
router.post('/api/branch/add_user', auth, controller.AddUser)
router.post('/api/branch/remove_user', auth, controller.RemoveUser)
router.post('/api/branch/update_work_time', auth, controller.UpdateWorkTime)
router.post('/api/branch/set_address', auth, controller.SetAddress)
router.post('/api/branch/add_delivery_type', auth, controller.AddDeliveryType)
router.post('/api/branch/remove_delivery_type', auth, controller.RemoveDeliveryType)
router.get('/api/branch/list_favorite', auth, controller.ListFavorite)
router.post('/api/branch/add_favorite', auth, controller.AddFavorite)
router.post('/api/branch/remove_favorite', auth, controller.RemoveFavorite)
router.post('/api/branch/set_print_template', auth, controller.SetPrintTemplate)
router.post('/api/branch/add_printer', auth, controller.AddPrinter)
router.post('/api/branch/edit_printer', auth, controller.EditPrinter)
router.post('/api/branch/remove_printer', auth, controller.RemovePrinter)
router.get('/api/branch/list_pay_types', auth, controller.ListPayTypes)
router.post('/api/branch/add_pay_type', auth, controller.AddPayType)
router.post('/api/branch/remove_pay_type', auth, controller.RemovePayType)
return router
}