Skip to content

Commit 9e89b0b

Browse files
authored
Merge pull request #1049 from appwrite/remove-async
chore: remove unnecessary async calls in react-native
2 parents d881620 + f88f02a commit 9e89b0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/react-native/src/services/template.ts.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export class {{ service.name | caseUcfirst }} extends Service {
4242
* @returns {% if method.type == 'webAuth' %}{void|string}{% elseif method.type == 'location' %}{URL}{% else %}{Promise}{% endif %}
4343

4444
*/
45-
{% if method.type != 'location' and method.type != 'webAuth'%}async {% endif %}{{ method.name | caseCamel }}{{ method.responseModel | getGenerics(spec) | raw }}({% for parameter in method.parameters.all %}{{ parameter.name | caseCamel | escapeKeyword }}{% if not parameter.required or parameter.nullable %}?{% endif %}: {{ parameter | getPropertyType(method) | raw }}{% if not loop.last %}, {% endif %}{% endfor %}{% if 'multipart/form-data' in method.consumes %}, onProgress = (progress: UploadProgress) => {}{% endif %}): {{ method | getReturn(spec) | raw }} {
45+
{% if method.type == 'upload'%}async {% endif %}{{ method.name | caseCamel }}{{ method.responseModel | getGenerics(spec) | raw }}({% for parameter in method.parameters.all %}{{ parameter.name | caseCamel | escapeKeyword }}{% if not parameter.required or parameter.nullable %}?{% endif %}: {{ parameter | getPropertyType(method) | raw }}{% if not loop.last %}, {% endif %}{% endfor %}{% if 'multipart/form-data' in method.consumes %}, onProgress = (progress: UploadProgress) => {}{% endif %}): {{ method | getReturn(spec) | raw }} {
4646
{% for parameter in method.parameters.all %}
4747
{% if parameter.required %}
4848
if (typeof {{ parameter.name | caseCamel | escapeKeyword }} === 'undefined') {

0 commit comments

Comments
 (0)