add: reject user

This commit is contained in:
2025-10-15 12:09:01 +07:00
parent 7ad8c6b3fe
commit c76953bf89
3 changed files with 47 additions and 1 deletions

View File

@@ -68,6 +68,17 @@ class UserController {
return res.status(response.statusCode).json(response);
}
// Reject user
static async reject(req, res) {
const { id } = req.params;
const approverId = req.user.user_id;
const updatedUser = await UserService.rejectUser(id, approverId);
const response = await setResponse(updatedUser, 'User rejected successfully');
return res.status(response.statusCode).json(response);
}
// Soft delete user
static async delete(req, res) {
const { id } = req.params;