some file added

This commit is contained in:
Saimon8420 2025-02-02 17:43:22 +06:00
parent 15d1f6967e
commit 86e38900fc

View file

@ -30,14 +30,17 @@ projectRoutes.get("/", ({ userId }: any) => getAllProjects(userId), {
projectRoutes.post("/create", ({ userId }: any) => createProject(userId));
projectRoutes.put("/update/:project_id", ({ request, params: { project_id } }) => updateProject(project_id, request.body), {
projectRoutes.put("/update/:project_id", async ({ body, params: { project_id } }) => {
const response = await updateProject(project_id, body);
return response;
}, {
params: t.Object({
project_id: t.String()
}),
body: t.Object({
object: t.Record(t.String(), t.Any()), // Allows any JSON object
name: t.String({ minLength: 1 }),
description: t.String({ minLength: 1 }),
name: t.String(),
description: t.String(),
preview_url: t.String(),
})
});