DBLabs/abitur_list_client/routes/request.routes.js

16 lines
733 B
JavaScript
Raw Normal View History

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')
router.post('/request', requestController.createRequest)
router.post('/request/manual', requestController.createRequestWithId)
router.get('/request', requestController.getRequests)
router.get('/request/:id', requestController.getOneRequest)
router.put('/request', requestController.updateRequest)
router.delete('/request/', requestController.deleteRequest)
router.get('/request/abitur/:id', requestController.getAbiturRequests)
router.get('/request/spec/:id', requestController.getCountBySpec)
module.exports = router