| 12345678910111213141516171819202122 |
- // 채팅 수신 설정 클라이언트 API (수신설정 modal 전용) — Route Handler 프록시 경유(fetchApi)
- // Backend Web.Api/Endpoints/MyPage/{GetChatSettings,UpdateChatSettings}.cs 대응.
- import { fetchApi } from '@/lib/utils/client';
- import { ResultDto } from '@/types/response/common';
- import { ChatSettings } from '@/types/chat';
- // 내 채팅 수신 설정 조회 (JWT) — GET /api/mypage/chat-settings
- export async function fetchChatSettings(): Promise<ResultDto<ChatSettings>>
- {
- return await fetchApi<ChatSettings>('/api/mypage/chat-settings', {
- method: 'GET'
- });
- }
- // 내 채팅 수신 설정 저장 (JWT) — POST /api/mypage/chat-settings (백엔드 case-insensitive 바인딩)
- export async function updateChatSettings(settings: ChatSettings): Promise<ResultDto<null>>
- {
- return await fetchApi<null>('/api/mypage/chat-settings', {
- method: 'POST',
- body: settings
- });
- }
|