import axios from "../../../../config/axios";
import { CreateTaskPhaseType, UpdateTaskPhaseType } from "../types/TaskPhaseTypes";

export const createTaskPhase = async (params: CreateTaskPhaseType) => {
  const { data } = await axios.post(`/task-manager/task-phases`, params);
  return data;
};

export const updateTaskPhase = async (id: string, params: UpdateTaskPhaseType) => {
  const { data } = await axios.patch(`/task-manager/task-phases/${id}`, params);
  return data;
};

export const deleteTaskPhase = async (id: string) => {
  const { data } = await axios.delete(`/task-manager/task-phases/${id}`);
  return data;
};
