lemmy-js-client 0.18.1-rc.1 → 0.18.1-rc.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/dist/http.d.ts
CHANGED
@@ -141,7 +141,7 @@ export declare class LemmyHttp {
|
|
141
141
|
* @param headers optional headers. Should contain `x-real-ip` and `x-forwarded-for` .
|
142
142
|
*/
|
143
143
|
constructor(baseUrl: string, options?: {
|
144
|
-
fetchFunction
|
144
|
+
fetchFunction?: typeof fetch;
|
145
145
|
headers?: {
|
146
146
|
[key: string]: string;
|
147
147
|
};
|
package/dist/http.js
CHANGED
@@ -766,6 +766,9 @@ class LemmyHttp {
|
|
766
766
|
body: formData,
|
767
767
|
headers: Object.assign(Object.assign({}, __classPrivateFieldGet(this, _LemmyHttp_headers, "f")), headers),
|
768
768
|
});
|
769
|
+
if (response.status === 413) {
|
770
|
+
return { msg: "too_large" };
|
771
|
+
}
|
769
772
|
const responseJson = yield response.json();
|
770
773
|
if (responseJson.msg === "ok") {
|
771
774
|
const { file: hash, delete_token: deleteToken } = responseJson.files[0];
|
package/dist/types/Person.d.ts
CHANGED