mirror of
https://github.com/pawelmalak/flame.git
synced 2024-12-21 09:11:29 +03:00
21 lines
460 B
JavaScript
21 lines
460 B
JavaScript
const express = require('express');
|
|
const router = express.Router();
|
|
const upload = require('../middleware/multer');
|
|
|
|
const {
|
|
createApp,
|
|
getAllApps,
|
|
getSingleApp,
|
|
updateApp,
|
|
deleteApp,
|
|
reorderApps,
|
|
} = require('../controllers/apps');
|
|
|
|
router.route('/').post(upload, createApp).get(getAllApps);
|
|
|
|
router.route('/:id').get(getSingleApp).put(upload, updateApp).delete(deleteApp);
|
|
|
|
router.route('/0/reorder').put(reorderApps);
|
|
|
|
module.exports = router;
|