Skip to content

Commit

Permalink
Don't force Mavo to perform unnecessary steps
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitrySharabin committed Oct 31, 2023
1 parent f9a2d57 commit 37efb95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mavo-yandex.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const _ = Mavo.Backend.register(
const resource = await this.request(call);
const params = new URL(resource.href).searchParams;

return this.request(resource.href, {}, resource.method, {
return this.request(resource.href, undefined, resource.method, {
headers: {
"Content-Type": params.get("content_type")
}
Expand All @@ -72,10 +72,10 @@ const _ = Mavo.Backend.register(
Authorization: `OAuth ${this.accessToken}`
};

const resource = await this.request(`resources/download?path=/${this.path}`, {}, "GET", { headers });
const resource = await this.request(`resources/download?path=/${this.path}`, undefined, "GET", { headers });
const params = new URL(resource.href).searchParams;

return this.request(resource.href, {}, resource.method, { headers: {
return this.request(resource.href, undefined, resource.method, { headers: {
...headers,
"Content-Type": params.get("content_type")
} });
Expand Down

0 comments on commit 37efb95

Please sign in to comment.