Skip to content

Commit 3b3f380

Browse files
committed
fix: stringify same as toString in this case
1 parent f283815 commit 3b3f380

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/core/infra/repositories/ApiRepository.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,8 @@ export abstract class ApiRepository {
7777
let requestData = data
7878

7979
if (contentType === ApiConstants.CONTENT_TYPE_APPLICATION_JSON) {
80-
if (typeof data === 'object') {
80+
if (typeof data === 'object' || typeof data === 'boolean') {
8181
requestData = JSON.stringify(data)
82-
} else if (typeof data === 'boolean') {
83-
requestData = data.toString()
8482
}
8583
}
8684

0 commit comments

Comments
 (0)