Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //category.controller.js will have following methods :
- const Category = require('../models/category.model.js');
- // Create and Save a new Category
- exports.create = (req, res) => {
- };
- // Retrieve and return all categories from the database.
- exports.findAll = (req, res) => {
- };
- // Find a single category with a id
- exports.findOne = (req, res) => {
- };
- // Update a category identified by the id in the request
- exports.update = (req, res) => {
- };
- // Delete a category with the specified categoryId in the request
- exports.delete = (req, res) => {
- };
Advertisement
Add Comment
Please, Sign In to add comment