import { api } from '@/lib/api'; import type { Season, Episode } from '@/types'; export const seasonsApi = { getAll: () => api.get('/seasons').then((r) => r.data), getById: (id: number) => api.get(`/seasons/${id}`).then((r) => r.data), getEpisodes: (id: number) => api.get(`/seasons/${id}/episodes`).then((r) => r.data), create: (data: Partial) => api.post('/seasons', data).then((r) => r.data), update: (id: number, data: Partial) => api.put(`/seasons/${id}`, data).then((r) => r.data), delete: (id: number) => api.delete(`/seasons/${id}`).then((r) => r.data), };