feat: BY PASS API 등록 프로세스 설계 및 개발 (#63) #108

병합
HYOJIN feature/ISSUE-63-bypass-api-registration 에서 develop 로 19 commits 를 머지했습니다 2026-03-27 14:32:14 +09:00
Showing only changes of commit 9c393f9137 - Show all commits

파일 보기

@ -116,8 +116,15 @@ export const bypassApi = {
deleteJson<ApiResponse<void>>(`${BASE}/${id}`),
generateCode: (id: number, force = false) =>
postJson<ApiResponse<CodeGenerationResult>>(`${BASE}/${id}/generate?force=${force}`),
parseJson: (jsonSample: string) =>
postJson<ApiResponse<BypassFieldDto[]>>(`${BASE}/parse-json`, jsonSample),
parseJson: async (jsonSample: string): Promise<ApiResponse<BypassFieldDto[]>> => {
const res = await fetch(`${BASE}/parse-json`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: jsonSample, // 이미 JSON 문자열이므로 JSON.stringify 하지 않음
});
if (!res.ok) throw new Error(`API Error: ${res.status} ${res.statusText}`);
return res.json();
},
getWebclientBeans: () =>
fetchJson<ApiResponse<WebClientBeanInfo[]>>(`${BASE}/webclient-beans`),
};