Skip to content

Commit

Permalink
Revert "chore: remove 'arraybuffer' param"
Browse files Browse the repository at this point in the history
This reverts commit 5a33054.
  • Loading branch information
loks0n committed Dec 26, 2023
1 parent 5a33054 commit 67a67dc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion templates/deno/src/services/service.ts.twig
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export class {{ service.name | caseUcfirst }} extends Service {

payload['{{ parameter.name }}'] = { type: 'file', file: new File([uploadableChunkTrimmed], {{ parameter.name | caseCamel | escapeKeyword }}.filename), filename: {{ parameter.name | caseCamel | escapeKeyword }}.filename };

response = await this.client.call('{{ method.method | caseLower }}', apiPath, apiHeaders, payload);
response = await this.client.call('{{ method.method | caseLower }}', apiPath, apiHeaders, payload{% if method.type == 'location' %}, 'arraybuffer'{% endif %});

if (!id) {
id = response['$id'];
Expand Down
2 changes: 1 addition & 1 deletion templates/node/base/requests/api.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
{% for key, header in method.headers %}
'{{ key }}': '{{ header }}',
{% endfor %}
}, payload);
}, payload{% if method.type == 'location' %}, 'arraybuffer'{% endif %});
2 changes: 1 addition & 1 deletion templates/node/base/requests/file.twig
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

payload['{{ parameter.name }}'] = { type: 'file', file: new File([uploadableChunkTrimmed], {{ parameter.name | caseCamel | escapeKeyword }}.filename), filename: {{ parameter.name | caseCamel | escapeKeyword }}.filename };

response = await this.client.call('{{ method.method | caseLower }}', apiPath, apiHeaders, payload);
response = await this.client.call('{{ method.method | caseLower }}', apiPath, apiHeaders, payload{% if method.type == 'location' %}, 'arraybuffer'{% endif %});

if (!id) {
id = response['$id'];
Expand Down

0 comments on commit 67a67dc

Please sign in to comment.