Skip to content

Commit 7d9204b

Browse files
authored
Merge pull request #25 from computate/computate
Allow sending scopes to patchFuture and deleteFuture
2 parents d1cd895 + 3763573 commit 7d9204b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/main/java/org/computate/frFR/java/EcrireApiClasse.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2705,6 +2705,11 @@ else if(classeApiMethode.equals(i18nGlobale.getString(I18n.var_PUTFusion)) || cl
27052705
tl(3, "try {");
27062706
tl(4, i18nGlobale.getString(I18n.var_requeteSite), ".setJsonObject(body);");
27072707
tl(4, i18nGlobale.getString(I18n.var_requeteService), ".getParams().getJsonObject(\"query\").put(\"rows\", 1);");
2708+
tl(4, "Optional.ofNullable(", i18nGlobale.getString(I18n.var_requeteService), ".getParams().getJsonArray(\"scopes\")).ifPresent(scopes -> {");
2709+
tl(5, "scopes.stream().map(v -> v.toString()).forEach(scope -> {");
2710+
tl(6, i18nGlobale.getString(I18n.var_requeteSite), ".addScopes(scope);");
2711+
tl(5, "});");
2712+
tl(4, "});");
27082713
tl(4, i18nGlobale.getString(I18n.var_rechercher), classeApiClasseNomSimple, i18nGlobale.getString(I18n.var_Liste), "(", i18nGlobale.getString(I18n.var_requeteSite), ", false, true, true).onSuccess(", i18nGlobale.getString(I18n.var_liste), classeNomSimple, " -> {");
27092714
tl(5, "try {");
27102715
tl(6, classeNomSimple, " o = ", i18nGlobale.getString(I18n.var_liste), classeNomSimple, ".first();");
@@ -2758,6 +2763,11 @@ else if(classeApiMethode.equals(i18nGlobale.getString(I18n.var_PUTFusion)) || cl
27582763
tl(3, "try {");
27592764
tl(4, i18nGlobale.getString(I18n.var_requeteSite), ".setJsonObject(body);");
27602765
tl(4, i18nGlobale.getString(I18n.var_requeteService), ".getParams().getJsonObject(\"query\").put(\"rows\", 1);");
2766+
tl(4, "Optional.ofNullable(", i18nGlobale.getString(I18n.var_requeteService), ".getParams().getJsonArray(\"scopes\")).ifPresent(scopes -> {");
2767+
tl(5, "scopes.stream().map(v -> v.toString()).forEach(scope -> {");
2768+
tl(6, i18nGlobale.getString(I18n.var_requeteSite), ".addScopes(scope);");
2769+
tl(5, "});");
2770+
tl(4, "});");
27612771
tl(4, i18nGlobale.getString(I18n.var_rechercher), classeApiClasseNomSimple, i18nGlobale.getString(I18n.var_Liste), "(", i18nGlobale.getString(I18n.var_requeteSite), ", false, true, true).onSuccess(", i18nGlobale.getString(I18n.var_liste), classeNomSimple, " -> {");
27622772
tl(5, "try {");
27632773
tl(6, classeNomSimple, " o = ", i18nGlobale.getString(I18n.var_liste), classeNomSimple, ".first();");

0 commit comments

Comments
 (0)