Merge remote-tracking branch 'upstream/develop' into feat/incidents

This commit is contained in:
Alex Holliday
2024-07-22 15:18:52 -07:00
14 changed files with 305 additions and 35 deletions

View File

@@ -428,6 +428,18 @@ const deleteUserController = async (req, res, next) => {
}
};
const getAllUsersController = async (req, res) => {
try {
const allUsers = await req.db.getAllUsers(req, res);
res
.status(200)
.json({ success: true, msg: "Got all users", data: allUsers });
} catch (error) {
error.service = SERVICE_NAME;
next(error);
}
};
module.exports = {
registerController,
loginController,
@@ -438,4 +450,5 @@ module.exports = {
validateRecoveryTokenController,
resetPasswordController,
deleteUserController,
getAllUsersController,
};