Feat/maintenance window controller (#475)
* Added createMaintenanceWindow route * Added getMaintenanceWindowsByUserId * Added getMaintenaceWindowsByMonitorId method, updated routes * Exported delete methods
This commit is contained in:
1 parent
5fe92f2b31
commit
95dfc8d82c
7 files changed
+168
-2
No files matched your search
@@ -54,7 +54,7 @@ const createMaintenanceWindow = async (maintenanceWindowData) => {
|
||||
* .then(maintenanceWindows => console.log(maintenanceWindows))
|
||||
* .catch(error => console.error(error));
|
||||
*/
|
||||
const getMaintenanceWindowByUserId = async (userId) => {
|
||||
const getMaintenanceWindowsByUserId = async (userId) => {
|
||||
try {
|
||||
const maintenanceWindows = await MaintenanceWindow.find({ userId: userId });
|
||||
return maintenanceWindows;
|
||||
@@ -152,7 +152,7 @@ const deleteMaintenanceWindowByUserId = async (userId) => {
|
||||
|
||||
module.exports = {
|
||||
createMaintenanceWindow,
|
||||
getMaintenanceWindowByUserId,
|
||||
getMaintenanceWindowsByUserId,
|
||||
getMaintenanceWindowsByMonitorId,
|
||||
deleteMaintenaceWindowById,
|
||||
deleteMaintenanceWindowByMonitorId,
|
||||
|
||||
Reference in new issue
Block a user