feat: add MongoDB search method, endpoints, and settings module
deploy-chabokan / deploy (push) Canceled after 0s
deploy-chabokan / deploy (push) Canceled after 0s
This commit is contained in:
@@ -4,7 +4,7 @@ const Role = require('./roleModel')
|
||||
const roleService = require('./roleService')
|
||||
|
||||
exports.getAllRoles = catchAsync(async (req, res, next) => {
|
||||
const roles = await roleService.getAllRoles()
|
||||
const roles = await roleService.getAllRoles(req.query)
|
||||
|
||||
res.status(200).json({
|
||||
status: 'success',
|
||||
@@ -13,6 +13,7 @@ exports.getAllRoles = catchAsync(async (req, res, next) => {
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
exports.createRole = catchAsync(async (req, res, next) => {
|
||||
const role = await roleService.createRole(req.body)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user