Revision 60299
Added by Katerina Iatropoulou about 3 years ago
RegistryCalls.java | ||
---|---|---|
62 | 62 |
params.put("coid", coid); |
63 | 63 |
params.put("mail", email); |
64 | 64 |
JsonElement response = httpUtils.get("co_people.json", params); |
65 |
return (response != null) ? response.getAsJsonObject().get("CoPeople").getAsJsonArray().get(0).getAsJsonObject().get("Id").getAsInt() : null; |
|
65 |
if(response != null) { |
|
66 |
JsonArray coPeople = response.getAsJsonObject().get("CoPeople").getAsJsonArray(); |
|
67 |
if(coPeople.size() > 0) { |
|
68 |
return coPeople.get(0).getAsJsonObject().get("Id").getAsInt(); |
|
69 |
} |
|
70 |
} |
|
71 |
return null; |
|
66 | 72 |
} |
67 | 73 |
|
68 | 74 |
/** |
Also available in: Unified diff
Up to date with the latest in trunk.