13 lines
287 B
JavaScript
13 lines
287 B
JavaScript
module.exports = (app) => {
|
|
const recipes = require('../controllers/recipe.controller');
|
|
|
|
app.route('/recipes')
|
|
.get(recipes.findAll)
|
|
.post(recipes.create);
|
|
|
|
app.route('/recipes/:recipeId')
|
|
.get(recipes.findOne)
|
|
.put(recipes.update)
|
|
.delete(recipes.delete);
|
|
};
|