- 일정 상세 조회 기능 구현 중
This commit is contained in:
@@ -7,11 +7,14 @@ import {
|
||||
} from '@/data/request';
|
||||
import {
|
||||
CreateScheduleResponse,
|
||||
ScheduleDetailResponse,
|
||||
ScheduleListResponse
|
||||
} from "@/data/response";
|
||||
import { HttpApiUrl } from "@baekyangdan/core-utils";
|
||||
|
||||
const ScheduleApi = HttpApiUrl.Schedule;
|
||||
export class ScheduleNetwork extends BaseNetwork {
|
||||
private baseUrl = "/schedule";
|
||||
private baseUrl = ScheduleApi.base;
|
||||
|
||||
async getList(data: ScheduleListRequest) {
|
||||
return await this.post<ScheduleListResponse>(
|
||||
@@ -21,28 +24,28 @@ export class ScheduleNetwork extends BaseNetwork {
|
||||
}
|
||||
|
||||
async getDetail(id: string) {
|
||||
return await this.get(
|
||||
return await this.get<ScheduleDetailResponse>(
|
||||
`${this.baseUrl}/${id}`
|
||||
);
|
||||
}
|
||||
|
||||
async create(data: CreateScheduleRequest) {
|
||||
return await this.post<CreateScheduleResponse>(
|
||||
`${this.baseUrl}/create`,
|
||||
`${this.baseUrl}${ScheduleApi.create}`,
|
||||
data
|
||||
);
|
||||
}
|
||||
|
||||
async update(data: UpdateScheduleRequest) {
|
||||
return await this.post(
|
||||
`${this.baseUrl}/update`,
|
||||
`${this.baseUrl}${ScheduleApi.update}`,
|
||||
data
|
||||
);
|
||||
}
|
||||
|
||||
async del(data: DeleteScheduleRequest) {
|
||||
return await this.post(
|
||||
`${this.baseUrl}/delete`,
|
||||
`${this.baseUrl}${ScheduleApi.delete}`,
|
||||
data
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user