@ovencord/rest 2.5.2 → 2.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/lib/REST.ts +7 -2
package/package.json
CHANGED
package/src/lib/REST.ts
CHANGED
|
@@ -372,7 +372,10 @@ export class REST extends AsyncEventEmitter<RestEvents> {
|
|
|
372
372
|
formData.append(key, value as string | Blob);
|
|
373
373
|
}
|
|
374
374
|
} else {
|
|
375
|
-
formData.append(
|
|
375
|
+
formData.append(
|
|
376
|
+
'payload_json',
|
|
377
|
+
JSON.stringify(request.body, (_, value) => (typeof value === 'bigint' ? value.toString() : value)),
|
|
378
|
+
);
|
|
376
379
|
}
|
|
377
380
|
}
|
|
378
381
|
|
|
@@ -385,7 +388,9 @@ export class REST extends AsyncEventEmitter<RestEvents> {
|
|
|
385
388
|
finalBody = request.body as BodyInit;
|
|
386
389
|
} else {
|
|
387
390
|
// Stringify the JSON data
|
|
388
|
-
finalBody = JSON.stringify(request.body)
|
|
391
|
+
finalBody = JSON.stringify(request.body, (_, value) =>
|
|
392
|
+
typeof value === 'bigint' ? value.toString() : value,
|
|
393
|
+
);
|
|
389
394
|
// Set the additional headers to specify the content-type
|
|
390
395
|
additionalHeaders = { 'Content-Type': 'application/json' };
|
|
391
396
|
}
|