diff --git a/src/app/api/project/UserController.ts b/src/app/api/project/UserController.ts index b865b2b1..e9aff82a 100644 --- a/src/app/api/project/UserController.ts +++ b/src/app/api/project/UserController.ts @@ -1,49 +1,18 @@ import { type Response, type Request } from "express"; import { Controller, Get } from "@ControllerPattern/index"; import { Service } from "typedi"; -import { IsNotEmpty, IsString, IsUUID, validateOrReject } from "class-validator"; -import ProjectService from "@Services/_TemplateService/_TemplateService"; import ApiController from "@Common/system/controller-pattern/ApiController"; -class Params { - @IsString() - @IsNotEmpty() - @IsUUID() - public uuid!: string; -} - @Controller() @Service() export default class ProjectController extends ApiController { - constructor(private projectService: ProjectService) { - super(); - } - - @Get("/api/projects") + + @Get("/api/projects/users") protected async get(req: Request, res: Response) { // const query = processFindManyQuery(req.query); this.httpSuccess(res, { message: "get" }); } - @Get("/api/projects/:uuid") - protected async getByUUID(req: Request, res: Response) { - const { uuid } = req.params as Partial; - const params = new Params(); - params.uuid = uuid!; - try { - await validateOrReject(params, { forbidUnknownValues: true }); - } catch (error) { - this.httpBadRequest(res, error); - return; - } - - const project = await this.projectService.getByUUID(); - // if (!project) { - // this.httpNotFoundRequest(res); - // return; - // } - this.httpSuccess(res, project); - } }