Fixed URL format in Gitea probing.

This commit is contained in:
Christian P. MOMON 2022-02-19 12:13:27 +01:00
parent 8f4ff59a6a
commit a2eee04e72

View file

@ -56,15 +56,15 @@ public class GiteaAPI
this.token = token;
//
String json = IOUtils.toString(new URL(url + "/api/v1/admin/users?limit=100000&token=" + token), Charset.defaultCharset());
String json = IOUtils.toString(new URL(this.url + "/api/v1/admin/users?limit=100000&token=" + token), Charset.defaultCharset());
this.users = (JSONArray) (new JSONParser().parse(json));
//
json = IOUtils.toString(new URL(url + "/api/v1/admin/orgs?limit=100000&token=" + token), Charset.defaultCharset());
json = IOUtils.toString(new URL(this.url + "/api/v1/admin/orgs?limit=100000&token=" + token), Charset.defaultCharset());
this.organizations = (JSONArray) (new JSONParser().parse(json));
//
json = IOUtils.toString(new URL(url + "/api/v1/repos/search?limit=100000&token=" + token), Charset.defaultCharset());
json = IOUtils.toString(new URL(this.url + "/api/v1/repos/search?limit=100000&token=" + token), Charset.defaultCharset());
this.repositories = (JSONArray) ((JSONObject) (new JSONParser().parse(json))).get("data");
}