Skip to content

Commit

Permalink
Fix error raised when uploading media with location in typescript (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
dvacca-onfido authored Sep 2, 2024
1 parent ab0e671 commit 5af128a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion generators/typescript-axios/templates/apiInner.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur
localVarFormParams.append('{{baseName}}', String({{paramName}}) as any);{{/isBoolean}}{{/isPrimitiveType}}{{#isPrimitiveType}}{{#isFile}}
localVarFormParams.append('{{baseName}}', {{paramName}}.buffer as any, {{paramName}}.filename);{{/isFile}}{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isEnumRef}}
localVarFormParams.append('{{baseName}}', {{paramName}} as any);{{/isEnumRef}}{{^isEnumRef}}
localVarFormParams.append('{{baseName}}', new Blob([JSON.stringify({{paramName}})], { type: "application/json", }));{{/isEnumRef}}{{/isPrimitiveType}}{{/multipartFormData}}
localVarFormParams.append('{{baseName}}', JSON.stringify({{paramName}}));{{/isEnumRef}}{{/isPrimitiveType}}{{/multipartFormData}}
}{{/isArray}}{{! ONFIDO: Add a case specific for File - END }}
{{/formParams}}{{/vendorExtensions}}
{{#vendorExtensions}}{{#hasFormParams}}{{^multipartFormData}}
Expand Down
2 changes: 1 addition & 1 deletion generators/typescript-axios/templates/package.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
}
},
"dependencies": {
"axios": "^1.6.1"
"axios": "^1.7.4" {{! Updated minimum Axios version to solve Dependabot alert }}
},
"devDependencies": {
{{! Added dependencies for tests development - BEGIN }}
Expand Down

0 comments on commit 5af128a

Please sign in to comment.