Skip to content

Commit

Permalink
Add Not Found handler
Browse files Browse the repository at this point in the history
  • Loading branch information
ruchernchong committed Oct 7, 2024
1 parent 98eb102 commit 23dd745
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ if (process.env.FEATURE_FLAG_RATE_LIMIT) {
// return next();
// });

app.notFound((c) => c.json({ message: `Not Found: ${c.req.path}` }));

app.get("/", async (c) => {
const month = c.req.query("month");
return c.json(await getCarsByFuelType(FUEL_TYPE.PETROL, month));
Expand Down

0 comments on commit 23dd745

Please sign in to comment.