Add route and controller

This commit is contained in:
Alex Holliday committed 2024-07-02 10:38:02 -07:00
1 parent 898738e287
commit d7d6effdda
3 files changed
+31

No files matched your search

+10
View File
@@ -163,6 +163,15 @@ const resetPassword = async (req, res) => {
}
};
const checkAdmin = async (req, res) => {
try {
const admin = await UserModel.findOne({ role: "admin" });
console.log(admin);
} catch (error) {
throw error;
}
};
//****************************************
// Monitors
//****************************************
@@ -502,6 +511,7 @@ module.exports = {
requestRecoveryToken,
validateRecoveryToken,
resetPassword,
checkAdmin,
getAllMonitors,
getMonitorById,
getMonitorsByUserId,