-
Notifications
You must be signed in to change notification settings - Fork 0
/
routes.ts
30 lines (20 loc) · 906 Bytes
/
routes.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { Express } from "express";
import verifyJWT from "./src/middleware/verifyJWT";
import verifyPermission from "./src/middleware/verifyUserPermission";
import authRouter from "./src/routes/auth.routes";
import subjectRouter from "./src/routes/subject.routes";
import topicRouter from "./src/routes/topicUnderSubject.routes";
import questionRouter from "./src/routes/question.routes";
import submissionRouter from "./src/routes/submission.routes";
import revisionRouter from "./src/routes/revision.routes";
function routes(app: Express): void {
app.use("/api/v2/auth/", authRouter);
app.use(verifyJWT);
app.use("/api/v2/subject", subjectRouter);
app.use("/api/v2/topic", topicRouter);
app.use("/api/v2/question", questionRouter);
app.use(verifyPermission);
app.use("/api/v2/submission", submissionRouter);
app.use("/api/v2/revision", revisionRouter);
}
export default routes;