Skip to content

Commit a5bba35

Browse files
committed
♻️ refactor : Optimize API functionality
- Changed the process for specifying content types in fetch Related Issue : YJU-OKURA#128
1 parent f40e27c commit a5bba35

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/api/apiUtils.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ const req = async (
5252
headers.append('Authorization', `Bearer ${token}`);
5353
}
5454

55-
if (body instanceof FormData) {
56-
headers.append('Content-Type', 'multipart/form-data');
57-
} else if (body) {
55+
if (!(body instanceof FormData) && body) {
5856
headers.append('Content-Type', 'application/json');
5957
body = JSON.stringify(body);
6058
}

0 commit comments

Comments
 (0)