2023-03-31 23:19:54 +04:00
|
|
|
const Router = require('express')
|
|
|
|
const router = new Router()
|
|
|
|
|
2023-05-14 15:26:22 +04:00
|
|
|
//const requestController = require('..//controllers/request.controller')
|
|
|
|
const requestController = require(process.env.dbPath + 'request.controller')
|
2023-03-31 23:19:54 +04:00
|
|
|
|
|
|
|
router.post('/request', requestController.createRequest)
|
2023-04-29 14:20:44 +04:00
|
|
|
router.post('/request/manual', requestController.createRequestWithId)
|
2023-03-31 23:19:54 +04:00
|
|
|
router.get('/request', requestController.getRequests)
|
2023-04-29 14:20:44 +04:00
|
|
|
router.get('/request/:id', requestController.getOneRequest)
|
2023-03-31 23:19:54 +04:00
|
|
|
router.put('/request', requestController.updateRequest)
|
2023-05-14 01:50:44 +04:00
|
|
|
router.delete('/request/', requestController.deleteRequest)
|
2023-04-03 01:00:37 +04:00
|
|
|
router.get('/request/abitur/:id', requestController.getAbiturRequests)
|
2023-04-29 14:20:44 +04:00
|
|
|
router.get('/request/spec/:id', requestController.getCountBySpec)
|
2023-03-31 23:19:54 +04:00
|
|
|
|
|
|
|
module.exports = router
|