fix: React saveBatch 요청 body 객체 래핑 제거
saveBatch API 호출 시 { entries } 객체로 감싸서 보내던 것을
배열 직접 전송으로 수정. 백엔드 @RequestBody List<>와 불일치로
임시저장/제출 시 status가 null로 표시되던 버그 해결.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
이 Commit은 다음에 포함되어 있습니다:
@@ -5,7 +5,7 @@ const BASE = '/api/wtm/timesheets';
|
|||||||
export const timesheetService = {
|
export const timesheetService = {
|
||||||
getWeekly: (weekStart: string) => api.get(`${BASE}/week`, { params: { weekStart } }),
|
getWeekly: (weekStart: string) => api.get(`${BASE}/week`, { params: { weekStart } }),
|
||||||
saveEntry: (tsId: number, entry: unknown) => api.post(`${BASE}/${tsId}/entries`, entry),
|
saveEntry: (tsId: number, entry: unknown) => api.post(`${BASE}/${tsId}/entries`, entry),
|
||||||
saveBatch: (tsId: number, entries: unknown[]) => api.put(`${BASE}/${tsId}/entries/batch`, { entries }),
|
saveBatch: (tsId: number, entries: unknown[]) => api.put(`${BASE}/${tsId}/entries/batch`, entries),
|
||||||
deleteEntry: (tsId: number, entryId: number) => api.delete(`${BASE}/${tsId}/entries/${entryId}`),
|
deleteEntry: (tsId: number, entryId: number) => api.delete(`${BASE}/${tsId}/entries/${entryId}`),
|
||||||
submit: (tsId: number) => api.post(`${BASE}/${tsId}/submit`),
|
submit: (tsId: number) => api.post(`${BASE}/${tsId}/submit`),
|
||||||
getHistory: (params: Record<string, unknown>) => api.get(`${BASE}/history`, { params }),
|
getHistory: (params: Record<string, unknown>) => api.get(`${BASE}/history`, { params }),
|
||||||
|
|||||||
새 Issue에서 참조
사용자 차단