fix: make cookie auth possible again

See #105
This commit is contained in:
LuanRT
2022-09-14 14:52:10 -03:00
parent 2aaa209906
commit 2de77c8f2c
3 changed files with 6 additions and 5 deletions

View File

@@ -64,11 +64,11 @@ class Actions {
/**
* Mimmics the Axios API using Fetch's Response object.
*/
async #wrap(response: Response, protobuf?: boolean) {
async #wrap(response: Response) {
return {
success: response.ok,
status_code: response.status,
data: protobuf ? await response.text() : JSON.parse(await response.text())
data: JSON.parse(await response.text())
};
}
@@ -776,7 +776,7 @@ class Actions {
return Parser.parseResponse(await response.json());
}
return this.#wrap(response, args.protobuf);
return this.#wrap(response);
}
#needsLogin(id: string) {