diff --git a/src/api/index.ts b/src/api/index.ts index 91dbad6..7861907 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -22,3 +22,4 @@ export { type WalletTransferBody, type WalletTransferResultData, } from "@/api/wallet"; +export { getPublicSettings, type SettingItem, type SettingListResponse } from "@/api/settings"; diff --git a/src/api/settings.ts b/src/api/settings.ts new file mode 100644 index 0000000..bae4078 --- /dev/null +++ b/src/api/settings.ts @@ -0,0 +1,19 @@ +import { lotteryRequest } from "@/lib/lottery-http"; +import { API_V1_PREFIX } from "@/api/paths"; + +export type SettingItem = { + key: string; + value: unknown; + group: string; + description: string | null; +}; + +export type SettingListResponse = { + items: SettingItem[]; +}; + +export async function getPublicSettings(group: string): Promise { + return lotteryRequest.get(`${API_V1_PREFIX}/settings`, { + params: { group }, + }); +} diff --git a/src/features/hall/hall-bet-result-dialog.tsx b/src/features/hall/hall-bet-result-dialog.tsx index 7929eaf..830f174 100644 --- a/src/features/hall/hall-bet-result-dialog.tsx +++ b/src/features/hall/hall-bet-result-dialog.tsx @@ -210,6 +210,7 @@ export function HallBetResultDialog({