forked from Telodendria/Telodendria
Convert RegTokenInfo
to a j2s
Schema. #1
2 changed files with 2 additions and 2 deletions
|
@ -124,7 +124,7 @@ ROUTE_IMPL(RoutePrivileges, path, argp)
|
|||
/* Fall through */
|
||||
case HTTP_GET:
|
||||
response = HashMapCreate();
|
||||
HashMapSet(response, "privileges", UserEncodePrivileges(UserGetPrivileges(user)));
|
||||
HashMapSet(response, "privileges", JsonValueArray(UserEncodePrivileges(UserGetPrivileges(user))));
|
||||
break;
|
||||
default:
|
||||
HttpResponseStatus(args->context, HTTP_BAD_REQUEST);
|
||||
|
|
|
@ -749,7 +749,7 @@ UserGetPrivileges(User * user)
|
|||
return USER_NONE;
|
||||
}
|
||||
|
||||
return UserDecodePrivileges(HashMapGet(DbJson(user->ref), "privileges"));
|
||||
return UserDecodePrivileges(JsonValueAsArray(HashMapGet(DbJson(user->ref), "privileges")));
|
||||
}
|
||||
|
||||
int
|
||||
|
|
Loading…
Reference in a new issue