chore: 팝업 인터페이스 수정

This commit is contained in:
2025-06-24 13:42:27 +09:00
parent 42dd76cf4d
commit 599c3590fe
2 changed files with 21 additions and 34 deletions
+17 -30
View File
@@ -1,6 +1,22 @@
import { getApiClient } from "./client";
import { ENDPOINT } from "../config";
export interface Popup {
popupSn: number;
popupTypeCd: string;
popupTypeNm: string;
contsTypeCd: string;
contsTypeNm: string;
popupTtl: string;
popupWdth: number;
popupHgt: number;
popupEndUseYn: string;
useYn: string;
mdfcnDt: string;
mdfr: string;
mdfrNm: string;
}
export interface PopupInfo {
popupSn: number;
popupTypeCd: string;
@@ -23,39 +39,10 @@ export interface PopupInfo {
mdfrNm: string;
}
interface SortConfig {
empty: boolean;
sorted: boolean;
unsorted: boolean;
}
interface PageableConfig {
sort: SortConfig;
offset: number;
pageNumber: number;
pageSize: number;
paged: boolean;
unpaged: boolean;
}
interface PageableList<T> {
content: T[];
pageable: PageableConfig;
sort: SortConfig;
totalPages: number;
totalElements: number;
number: number;
numberOfElements: number;
size: number;
first: boolean;
last: boolean;
empty: boolean;
}
const client = getApiClient();
export const getUserPopupList = async () => {
const response = await client.get<PageableList<PopupInfo>>(
const response = await client.get<Popup[]>(
`${ENDPOINT.CMS_SERVICE.POPUPS}/user/list`,
);
return response.data;