Merge branch 'master' into feat/check-routes

This commit is contained in:
Alex Holliday committed 2024-05-27 15:38:12 -07:00
commit bd4d442781
9 files changed
+185 -47

No files matched your search

+6 -6
View File
@@ -65,12 +65,6 @@ app.use("/api/v1/auth", authRouter);
app.use("/api/v1/monitors", verifyJWT, monitorRouter);
app.use("/api/v1/checks", verifyJWT, checkRouter);
/**
* Error handler middleware
* MUST be called after all routes
*/
app.use(handleErrors);
// Testing email service
// app.use('/sendEmail', async (req, res) => {
// const response = sendEmail(['veysel.boybay@bluewavelabs.ca'], 'Testing email service', '<h1>Testing Bluewavelabs</h1>');
@@ -88,4 +82,10 @@ app.use("/api/v1/healthy", (req, res) => {
}
});
/**
* Error handler middleware
* Should be called last
*/
app.use(handleErrors);
connectDbAndRunServer(app, db);