From 01eb624f59e0e147c0bdac7a2c8a13347713b995 Mon Sep 17 00:00:00 2001 From: serezhaolshan Date: Wed, 4 Sep 2024 07:09:04 +0300 Subject: [PATCH] feat: delete redundant endpoint --- src/router/watcher.router.ts | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/router/watcher.router.ts b/src/router/watcher.router.ts index 5efb6ab..03b2692 100644 --- a/src/router/watcher.router.ts +++ b/src/router/watcher.router.ts @@ -1,7 +1,6 @@ import { DependencyContainer } from "tsyringe"; import { Application } from "express"; import { WatcherNetwork } from "../watcher"; -import { NotificationService } from "../notification-sender"; const routes = (app: Application, container: DependencyContainer) => { @@ -47,19 +46,5 @@ const routes = (app: Application, container: DependencyContainer) => { "/api/v1/push-token", watcherNetwork.updateWatcherPushToken.bind(watcherNetwork) ); - - app.post("/api/v1/send-notification", (req, res) => { - const { title, body, pushToken, data } = req.body; - container.resolve(NotificationService).sendNotification({ - title, - body, - pushToken, - data - }).then((result) => { - res.send(result); - }).catch((error) => { - res.status(500).send(error); - }); - }); }; export default routes; \ No newline at end of file