feat: 일정 등록 기능

This commit is contained in:
2025-05-27 13:23:56 +09:00
parent d351b8e24e
commit a9887eaac6
16 changed files with 792 additions and 3 deletions
@@ -0,0 +1,24 @@
import { client } from "@/shared/api";
import { ENDPOINT } from "@/shared/config";
import type {
Schedule,
ScheduleFormData,
ScheduleParams,
ScheduleService,
} from "../model/schedule-interface";
class ScheduleApiService implements ScheduleService {
public async getSchedules(params?: ScheduleParams): Promise<Schedule[]> {
const response = await client.get<Schedule[]>(
ENDPOINT.CMS_SERVICE.SCHEDULES,
{ params },
);
return response.data;
}
public async createSchedule(data: ScheduleFormData): Promise<void> {
await client.post(ENDPOINT.CMS_SERVICE.SCHEDULES, data);
}
}
export const ScheduleApi = new ScheduleApiService();