Add route and controller
This commit is contained in:
1 parent
898738e287
commit
d7d6effdda
3 files changed
+31
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user