[Users | Trunk]: Get couId optimized

This commit is contained in:
Konstantinos Triantafyllou 2021-06-09 10:05:22 +00:00
parent 891ffdd9ea
commit 92da59a386
1 changed files with 2 additions and 3 deletions

View File

@ -142,13 +142,12 @@ public class RegistryCalls {
*/
public Integer getCouId(String name) {
JsonArray cous = getCous(name);
Integer couId = null;
for (JsonElement cou : cous) {
if (cou.getAsJsonObject().get("Name").getAsString().toLowerCase().equals(name.toLowerCase())) {
couId = cou.getAsJsonObject().get("Id").getAsInt();
return cou.getAsJsonObject().get("Id").getAsInt();
}
}
return couId;
return null;
}
/**