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:
@@ -47,7 +47,7 @@ exports.logoutUser = catchAsync(async (req, res, next) => {
|
||||
})
|
||||
|
||||
exports.getAllUsers = catchAsync(async (req, res, next) => {
|
||||
const users = await userService.getAllUsers()
|
||||
const users = await userService.getAllUsers(req.query)
|
||||
|
||||
res.status(200).json({
|
||||
status: 'success',
|
||||
@@ -56,6 +56,7 @@ exports.getAllUsers = catchAsync(async (req, res, next) => {
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
exports.userGetSelf = catchAsync(async (req, res, next) => {
|
||||
const user = req.user
|
||||
if (!user) {
|
||||
|
||||
Reference in New Issue
Block a user