File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -71,8 +71,7 @@ export default function ManitoAdminPage() {
7171
7272 try {
7373 setLoadingSessions ( true ) ;
74- const res = await apiClient . post ( '/admin/manito/sessions' , { code, title} ) ;
75- const created = res . data ?. data ;
74+ await apiClient . post ( '/admin/manito/sessions' , { code, title} ) ;
7675
7776 // 세션 목록 갱신
7877 await fetchSessions ( ) ;
Original file line number Diff line number Diff line change @@ -46,15 +46,18 @@ export const useAuthenticatedApi = () => {
4646
4747 // 요청 인터셉터
4848 client . interceptors . request . use ( ( config ) => {
49- if ( ! config . headers [ 'Content-Type' ] ) {
49+ // FormData인지 체크
50+ const isFormData = typeof FormData !== 'undefined' && config . data instanceof FormData ;
51+ if ( ! isFormData && ! config . headers [ 'Content-Type' ] ) {
5052 config . headers [ 'Content-Type' ] = 'application/json' ;
5153 }
5254
5355 if ( accessTokenRef . current ) {
5456 config . headers . Authorization = `Bearer ${ accessTokenRef . current } ` ;
5557 }
58+
5659 return config ;
57- } , ( error ) => Promise . reject ( error ) ) ;
60+ } , ( error ) => Promise . reject ( error ) , ) ;
5861
5962 // 응답 인터셉터
6063 client . interceptors . response . use ( ( response ) => response , async ( error ) => {
You can’t perform that action at this time.
0 commit comments