V1 for the builder processing
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
import express from "express";
|
||||
import { tokenValidator } from "../../../shared/utils/token.ts";
|
||||
import authorizedRoles from "../../../shared/middleware/rbacMiddleware.ts";
|
||||
import { recentDataController } from "../../V1/v1Controllers/homeController/v1homeController.ts";
|
||||
import {
|
||||
recentDataController,
|
||||
searchProjectController,
|
||||
searchTrashProjectController,
|
||||
} from "../../V1/v1Controllers/homeController/v1homeController.ts";
|
||||
|
||||
const v1homeRoutes = express.Router();
|
||||
|
||||
@@ -9,8 +13,20 @@ const v1homeRoutes = express.Router();
|
||||
v1homeRoutes.get(
|
||||
"/RecentlyViewed",
|
||||
tokenValidator,
|
||||
authorizedRoles("Admin", "User"),
|
||||
// authorizedRoles("Admin", "User"),
|
||||
recentDataController
|
||||
);
|
||||
v1homeRoutes.get(
|
||||
"/searchProjects",
|
||||
tokenValidator,
|
||||
// authorizedRoles("Admin", "User"),
|
||||
searchProjectController
|
||||
);
|
||||
v1homeRoutes.get(
|
||||
"/searchTrashProjects",
|
||||
tokenValidator,
|
||||
// authorizedRoles("Admin", "User"),
|
||||
searchTrashProjectController
|
||||
);
|
||||
|
||||
export default v1homeRoutes;
|
||||
|
||||
@@ -16,26 +16,26 @@ v1projectRouter.post("/upsertProject", tokenValidator, createProjectController);
|
||||
v1projectRouter.get(
|
||||
"/Projects",
|
||||
tokenValidator,
|
||||
authorizedRoles("Admin", "User"),
|
||||
// authorizedRoles("Admin", "User"),
|
||||
GetProjects
|
||||
);
|
||||
v1projectRouter.patch(
|
||||
"/Project/archive/:projectId",
|
||||
tokenValidator,
|
||||
authorizedRoles("Admin", "User"),
|
||||
// authorizedRoles("Admin", "User"),
|
||||
RemoveProject
|
||||
);
|
||||
|
||||
v1projectRouter.patch(
|
||||
"/Project/:projectId",
|
||||
tokenValidator,
|
||||
authorizedRoles("Admin", "User"),
|
||||
// authorizedRoles("Admin", "User"),
|
||||
updateProjectController
|
||||
);
|
||||
v1projectRouter.get(
|
||||
"/Project/:projectId",
|
||||
tokenValidator,
|
||||
authorizedRoles("Admin", "User"),
|
||||
// authorizedRoles("Admin", "User"),
|
||||
ViewData
|
||||
);
|
||||
|
||||
|
||||
@@ -7,19 +7,18 @@ import {
|
||||
} from "../../V1/v1Controllers/trashController/v1trashController.ts";
|
||||
|
||||
const v1TrashRoutes = express.Router();
|
||||
|
||||
//trash
|
||||
v1TrashRoutes.get(
|
||||
"/TrashItems ",
|
||||
"/TrashItems",
|
||||
tokenValidator,
|
||||
authorizedRoles("Admin", "User"),
|
||||
// authorizedRoles("Admin", "User"),
|
||||
GetTrashList
|
||||
);
|
||||
|
||||
v1TrashRoutes.patch(
|
||||
"/Trash/restore",
|
||||
tokenValidator,
|
||||
authorizedRoles("Admin", "User"),
|
||||
// authorizedRoles("Admin", "User"),
|
||||
RestoreTrash
|
||||
);
|
||||
export default v1TrashRoutes;
|
||||
|
||||
Reference in New Issue
Block a user