import { T_team } from '@/types/team.type';
import axiosInstance from './../axiosInstance';

export const teamService = {
    getTeams: () =>
        axiosInstance.get("/api/team"),

    getTeamById: (id: string) =>
        axiosInstance.get(`/api/team/${id}`),

    createTeam: (data: Partial<T_team>) =>
        axiosInstance.post("/api/team", data),

    updateTeam: (id: string, data: Partial<T_team>) =>
        axiosInstance.patch(`/api/team/${id}`, data),

    deleteTeam: (id: string) =>
        axiosInstance.delete(`/api/team/${id}`),
};