update project
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user