add db utils
This commit is contained in:
1 parent
9a8ce41c95
commit
9ffe17e9eb
6 files changed
+61
-11
No files matched your search
@@ -20,7 +20,7 @@ import { getTokenFromHeaders } from "../utils/utils.js";
|
||||
import logger from "../utils/logger.js";
|
||||
import { handleError, handleValidationError } from "./controllerUtils.js";
|
||||
import axios from "axios";
|
||||
|
||||
import seedDb from "../db/mongo/utils/seedDb.js";
|
||||
const SERVICE_NAME = "monitorController";
|
||||
|
||||
class MonitorController {
|
||||
@@ -495,6 +495,14 @@ class MonitorController {
|
||||
next(handleError(error, SERVICE_NAME, "getMonitorsByTeamId"));
|
||||
}
|
||||
};
|
||||
|
||||
seedDb = async (req, res, next) => {
|
||||
try {
|
||||
await seedDb(userId, teamId);
|
||||
} catch (error) {
|
||||
next(handleError(error, SERVICE_NAME, "seedDb"));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export default MonitorController;
|
||||
Reference in new issue
Block a user