mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-11-01 01:59:55 +00:00
Fix body not serializing because of bigint (#119)
* Fix body not serializing because of bigint * Use cleaner JSON handling
This commit is contained in:
parent
968e1c0049
commit
c66211f7c9
2 changed files with 10 additions and 0 deletions
|
@ -130,6 +130,11 @@ import { VerifyEmail } from "./types/VerifyEmail";
|
||||||
import { VerifyEmailResponse } from "./types/VerifyEmailResponse";
|
import { VerifyEmailResponse } from "./types/VerifyEmailResponse";
|
||||||
import { UploadImage, UploadImageResponse, VERSION } from "./types/others";
|
import { UploadImage, UploadImageResponse, VERSION } from "./types/others";
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
|
BigInt.prototype["toJSON"] = function () {
|
||||||
|
return this.toString();
|
||||||
|
};
|
||||||
|
|
||||||
enum HttpType {
|
enum HttpType {
|
||||||
Get = "GET",
|
Get = "GET",
|
||||||
Post = "POST",
|
Post = "POST",
|
||||||
|
|
|
@ -87,6 +87,11 @@ import { TransferCommunity } from "./types/TransferCommunity";
|
||||||
import { UserJoin } from "./types/UserJoin";
|
import { UserJoin } from "./types/UserJoin";
|
||||||
import { VerifyEmail } from "./types/VerifyEmail";
|
import { VerifyEmail } from "./types/VerifyEmail";
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
|
BigInt.prototype["toJSON"] = function () {
|
||||||
|
return this.toString();
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helps build lemmy websocket message requests, that you can use in your Websocket sends.
|
* Helps build lemmy websocket message requests, that you can use in your Websocket sends.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue