const Category = require('./categoryModel') const AppError = require('../../globalErrorHandler/AppError') module.exports.getAllCategories = async () => { return Category.find().populate('parentId') }