Convert RegTokenInfo to a j2s Schema. #1

Closed
jordan wants to merge 14 commits from Telodendria:pull-37 into implement-26
2 changed files with 2 additions and 2 deletions
Showing only changes of commit 647778ef82 - Show all commits

View file

@ -124,7 +124,7 @@ ROUTE_IMPL(RoutePrivileges, path, argp)
/* Fall through */ /* Fall through */
case HTTP_GET: case HTTP_GET:
response = HashMapCreate(); response = HashMapCreate();
HashMapSet(response, "privileges", UserEncodePrivileges(UserGetPrivileges(user))); HashMapSet(response, "privileges", JsonValueArray(UserEncodePrivileges(UserGetPrivileges(user))));
break; break;
default: default:
HttpResponseStatus(args->context, HTTP_BAD_REQUEST); HttpResponseStatus(args->context, HTTP_BAD_REQUEST);

View file

@ -749,7 +749,7 @@ UserGetPrivileges(User * user)
return USER_NONE; return USER_NONE;
} }
return UserDecodePrivileges(HashMapGet(DbJson(user->ref), "privileges")); return UserDecodePrivileges(JsonValueAsArray(HashMapGet(DbJson(user->ref), "privileges")));
} }
int int