Remove tutorials & add auth manager
This commit is contained in:
parent
a748b93133
commit
e87c4bb146
9 changed files with 46 additions and 198 deletions
|
|
@ -1,28 +0,0 @@
|
|||
module.exports = app => {
|
||||
const tutorials = require("../controllers/tutorial.controller.js");
|
||||
|
||||
let router = require("express").Router();
|
||||
|
||||
// Create a new Tutorial
|
||||
router.post("/", tutorials.create);
|
||||
|
||||
// Retrieve all Tutorials
|
||||
router.get("/", tutorials.findAll);
|
||||
|
||||
// Retrieve all published Tutorials
|
||||
router.get("/published", tutorials.findAllPublished);
|
||||
|
||||
// Retrieve a single Tutorial with id
|
||||
router.get("/:id", tutorials.findOne);
|
||||
|
||||
// Update a Tutorial with id
|
||||
router.put("/:id", tutorials.update);
|
||||
|
||||
// Delete a Tutorial with id
|
||||
router.delete("/:id", tutorials.delete);
|
||||
|
||||
// Create a new Tutorial
|
||||
router.delete("/", tutorials.deleteAll);
|
||||
|
||||
app.use('/api/tutorials', router);
|
||||
};
|
||||
Reference in a new issue