aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRitesh Ghosh <[email protected]>2023-08-03 23:23:56 +0530
committerRitesh Ghosh <[email protected]>2023-08-03 23:23:56 +0530
commit4a1a9249b9aee0cc3446c9a1532eb74786220115 (patch)
treef822ba6f29ad44924aa8abf3fac1679a2054fc40 /src
parentd503bb6c5c6c412deac29f55a0c734c68df29842 (diff)
downloadaniwatch-api-4a1a9249b9aee0cc3446c9a1532eb74786220115.tar.xz
aniwatch-api-4a1a9249b9aee0cc3446c9a1532eb74786220115.zip
feat(newRoutes): added `/` & `/home` routes
Diffstat (limited to 'src')
-rw-r--r--src/routes/index.ts13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/routes/index.ts b/src/routes/index.ts
index af12d76..d5e2a9b 100644
--- a/src/routes/index.ts
+++ b/src/routes/index.ts
@@ -1,11 +1,22 @@
import { Router, IRouter } from "express";
-import { getAnimeCategory, getAnimeSearch, getHomePage } from "../controllers";
+import {
+ getHomePage,
+ getAnimeSearch,
+ getAnimeCategory,
+ getAnimeAboutInfo,
+} from "../controllers";
const router: IRouter = Router();
+// /anime
+router.get("/", (_, res) => res.redirect("/"));
+
// /anime/home
router.get("/home", getHomePage);
+// /anime/info?id=${anime-id}
+router.get("/info", getAnimeAboutInfo);
+
// /anime/search?q=${query}&page=${page}
router.get("/search", getAnimeSearch);