KEYCLOAK-2767: Should return a primitive if possible.

A JSON primitive is valid JSON. There is no need to construct a JSON object
just for the sake of being JSON complient. This keeps things nice and simple.
This commit is contained in:
Guus der Kinderen committed 2016-04-07 13:19:29 +02:00
1 parent 6dc1194247
commit be578684b9
3 files changed
+4 -5

No files matched your search

@@ -685,10 +685,10 @@ public class UsersResource {
@GET
@NoCache
@Produces(MediaType.APPLICATION_JSON)
public Map<String, Integer> getUsersCount() {
public Integer getUsersCount() {
auth.requireView();
return Collections.singletonMap("count", session.users().getUsersCount(realm));
return session.users().getUsersCount(realm);
}
@Path("{id}/role-mappings")