update project

This commit is contained in:
hamid zarghami
2026-07-11 11:01:01 +03:30
parent 47691a649f
commit 1618b5fb57
7 changed files with 306 additions and 7 deletions
@@ -1,10 +1,13 @@
import axios from "../../../../config/axios";
import { CreateProjectType } from "../types/ProjectTypes";
import { CreateProjectType, UpdateProjectType } from "../types/ProjectTypes";
export const getProjectsByWorkspace = async (workspaceId: string) => {
const { data } = await axios.get(
`/task-manager/projects/user/workspace/${workspaceId}`,
);
const { data } = await axios.get(`/task-manager/projects/user/workspace/${workspaceId}`);
return data;
};
export const getProjectDetail = async (id: string) => {
const { data } = await axios.get(`/task-manager/projects/${id}`);
return data;
};
@@ -12,3 +15,8 @@ export const createProject = async (params: CreateProjectType) => {
const { data } = await axios.post(`/task-manager/projects`, params);
return data;
};
export const updateProject = async (id: string, params: UpdateProjectType) => {
const { data } = await axios.patch(`/task-manager/projects/${id}`, params);
return data;
};