Skip to content

Commit fea6686

Browse files
Merge pull request appwrite#615 from appwrite/fix-oauth
2 parents cb1c265 + df0c6a0 commit fea6686

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

templates/android/library/src/main/java/io/appwrite/services/ServiceTemplate.kt.twig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,15 @@ class {{ service.name | caseUcfirst }} : Service {
6262
{%~ for parameter in method.parameters.query | merge(method.parameters.body) %}
6363
"{{ parameter.name }}" to {{ parameter.name | caseCamel }},
6464
{%~ endfor %}
65+
{%~ if method.type == '___location' or method.type == 'webAuth' %}
6566
{%~ if method.auth | length > 0 %}
6667
{%~ for node in method.auth %}
6768
{%~ for key,header in node | keys %}
6869
"{{ header | caseLower }}" to client.config["{{ header | caseLower }}"],
6970
{%~ endfor %}
7071
{%~ endfor %}
7172
{%~ endif %}
73+
{%~ endif %}
7274
)
7375
{%~ if method.type == 'webAuth' %}
7476
val query = mutableListOf<String>()

templates/swift/base/params.twig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
{%- else -%} let
1111
{%- endif %} params: [String: Any?] = [
1212
{%~ for parameter in method.parameters.query | merge(method.parameters.body) %}
13-
"{{ parameter.name }}": {{ parameter.name | caseCamel | escapeKeyword }}{% if not loop.last or method.auth | length > 0 %},{% endif %}
13+
"{{ parameter.name }}": {{ parameter.name | caseCamel | escapeKeyword }}{% if not loop.last or (method.type == '___location' or method.type == 'webAuth' and method.auth | length > 0) %},{% endif %}
1414

1515
{%~ endfor %}
16+
{%~ if method.type == '___location' or method.type == 'webAuth' %}
1617
{%~ if method.auth | length > 0 %}
1718
{%~ for node in method.auth %}
1819
{%~ for key,header in node | keys %}
@@ -21,5 +22,6 @@
2122
{%~ endfor %}
2223
{%~ endfor %}
2324
{%~ endif %}
25+
{%~ endif %}
2426
]
2527
{%~ endif %}

0 commit comments

Comments
 (0)