Files
Dwinzo-Backend-V0.0/src/api-server/V1/v1Routes/v1-threadRoutes.ts

35 lines
834 B
TypeScript

import express from "express";
import { tokenValidator } from "../../../shared/utils/token.ts";
import { getALLthreads, threadComment, threadCommentDelete, threadCreate, threaddelete, threadUpdateTitle } from "../v1Controllers/threadController/threadController.ts";
const V1ThreadRoutes = express.Router();
V1ThreadRoutes.post(
"/upsetThread/",
tokenValidator,
threadCreate
);
V1ThreadRoutes.patch(
"/Thread/delete",
tokenValidator,
threaddelete
);
V1ThreadRoutes.patch(
"/Thread/updateTitle",
tokenValidator,
threadUpdateTitle
);
V1ThreadRoutes.post(
"/Thread/addComment",
tokenValidator,
threadComment
);
V1ThreadRoutes.patch(
"/Thread/deleteComment",
tokenValidator,
threadCommentDelete
);
V1ThreadRoutes.get(
"/Threads/:projectId",
tokenValidator,
getALLthreads
);
export default V1ThreadRoutes