feat(notify): intial nofity system added to monitor crashes and rfid wrapper
This commit is contained in:
19
server/services/notifications/notifyService.ts
Normal file
19
server/services/notifications/notifyService.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { OpenAPIHono } from "@hono/zod-openapi";
|
||||
|
||||
import sendemail from "./routes/sendMail.js";
|
||||
const app = new OpenAPIHono();
|
||||
|
||||
const routes = [sendemail] as const;
|
||||
|
||||
const appRoutes = routes.forEach((route) => {
|
||||
app.route("/notify", route);
|
||||
});
|
||||
|
||||
app.all("/notify/*", (c) => {
|
||||
return c.json({
|
||||
success: false,
|
||||
message: "you have encounted a notication route that dose not exist.",
|
||||
});
|
||||
});
|
||||
|
||||
export default app;
|
||||
Reference in New Issue
Block a user