diff --git a/src/gitea.cpp b/src/gitea.cpp index 9b459e4..35d6472 100644 --- a/src/gitea.cpp +++ b/src/gitea.cpp @@ -157,13 +157,13 @@ uint64_t get_last_pr_number() { const auto answer{api_request(http_method::GET, "/api/v1/repos/FediBlock/data/pulls", - "?sort=oldest")}; + "?sort=newest&limit=1")}; if (answer == "[]") { return 0; } const auto json{nlohmann::json::parse(answer)}; - _last_pr_number = json.front().back()["number"].get(); + _last_pr_number = json.front().front()["number"].get(); } return _last_pr_number;