created API For Aplication Absensi
This commit is contained in:
23
app/modules/branch/routes/branch.route.js
Normal file
23
app/modules/branch/routes/branch.route.js
Normal file
@@ -0,0 +1,23 @@
|
||||
const express = require('express')
|
||||
const router = express.Router()
|
||||
const controller = require('../controllers/branch.controller')
|
||||
const apiKey = require('../../../middlewares/apiKey')
|
||||
const jwt = require('../../../middlewares/authentication')
|
||||
|
||||
router.get('/', apiKey, (req, res) => {
|
||||
controller.getAll(req, res)
|
||||
})
|
||||
|
||||
router.post('/', apiKey, jwt, (req, res) => {
|
||||
controller.create(req, res)
|
||||
} )
|
||||
|
||||
router.put('/:id', apiKey, jwt, (req, res) => {
|
||||
controller.update(req, res)
|
||||
})
|
||||
|
||||
router.put('/:id', apiKey, jwt, (req, res) => {
|
||||
controller.destroy(req, res)
|
||||
})
|
||||
|
||||
module.exports = router
|
||||
Reference in New Issue
Block a user