chore: steiger 및 빌드 에러 fix

This commit is contained in:
2025-04-17 17:36:06 +09:00
parent 30a1c532d3
commit 9665189c95
10 changed files with 9 additions and 9 deletions
@@ -0,0 +1,51 @@
import { client } from "@/shared/api";
import { ENDPOINT } from "@/shared/config";
import type {
ContentsService,
ContentsParams,
ContentsList,
Contents,
ContentsFormData,
} from "../model/contents-interface";
export class ContentsApiService implements ContentsService {
public async getContentsList(params: ContentsParams): Promise<ContentsList> {
const response = await client.get<ContentsList>(
`${ENDPOINT.CMS_SERVICE.CONTENTS}`,
{ params },
);
return response.data;
}
public async getContentsInfo(contsSn: number): Promise<Contents> {
const response = await client.get<Contents>(
`${ENDPOINT.CMS_SERVICE.CONTENTS}/${contsSn}`,
);
return response.data;
}
public async createContents(data: ContentsFormData): Promise<void> {
const response = await client.post<void>(
`${ENDPOINT.CMS_SERVICE.CONTENTS_DETAILS}`,
data,
);
return response.data;
}
public async updateContents(
contsSn: number,
data: ContentsFormData,
): Promise<void> {
const response = await client.put<void>(
`${ENDPOINT.CMS_SERVICE.CONTENTS}/${contsSn}`,
data,
);
return response.data;
}
public async deleteContents(contsSn: number): Promise<void> {
await client.delete(`${ENDPOINT.CMS_SERVICE.CONTENTS}/${contsSn}`);
}
}
export const ContentsApi = new ContentsApiService();