Skip to content

Commit

Permalink
feat: delete delay for sending notification for test
Browse files Browse the repository at this point in the history
  • Loading branch information
serezhaolshan committed Oct 8, 2024
1 parent 966fb82 commit 61e823c
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/router/watcher.router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ const routes = (app: Application, container: DependencyContainer) => {

app.post("/api/v1/send-notification", async (req, res) => {
const { title, body, pushToken, data } = req.body;
await sleep(5000);
container.resolve(NotificationService).sendNotification({
title,
body,
Expand All @@ -63,10 +62,4 @@ const routes = (app: Application, container: DependencyContainer) => {
});
};

function sleep(ms: number) {
return new Promise((resolve) => {
setTimeout(resolve, ms);
});
}

export default routes;

0 comments on commit 61e823c

Please sign in to comment.