some file added
This commit is contained in:
parent
15d1f6967e
commit
86e38900fc
1 changed files with 6 additions and 3 deletions
|
|
@ -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(),
|
||||
})
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue