Compare commits

..

No commits in common. "2d2595b495d44a7ee38d6290e98e1c7b36ae7a12" and "1e7694df63e3974e5daca60c8d051db6b81bf8e6" have entirely different histories.

4 changed files with 2 additions and 5 deletions

View File

@ -187,7 +187,6 @@ std::generator<source_package_publishing_history> archive::getPublishedSources(
}
}
std::cout << "Running a getPublishedSources() operation..." << std::endl;
auto response = lp->api_get(self_link, params);
if(!response) co_return;
auto data = nlohmann::json::parse(response.value());

View File

@ -125,7 +125,6 @@ bool build::cancel() {
if (self_link.empty()) return false;
std::map<std::string, std::string> params;
params["ws.op"] = "cancel";
std::cout << "Running a cancel operation..." << std::endl;
auto response = lp->api_post(self_link, params);
return response.has_value();
}

View File

@ -221,8 +221,8 @@ std::string launchpad::build_full_url(const std::string& endpoint) const {
std::optional<std::string> launchpad::api_get(const std::string& endpoint, const std::map<std::string, std::string>& params) const {
std::string url = build_full_url(endpoint);
if (url.empty()) {
std::cerr << "Internal error: please include the following info in a bug report:" << std::endl;
if (!params.empty()) {
std::cerr << "Internal error: please include the following info in a bug report:" << std::endl;
for (const auto& [key, value] : params) {
std::cerr << url_encode(key) + "=" + url_encode(value) + "&";
}
@ -302,8 +302,8 @@ std::optional<std::string> launchpad::api_post(
const std::string& token_secret_override
) {
if (endpoint.empty()) {
std::cerr << "Internal error: please include the following info in a bug report:" << std::endl;
if (!params.empty()) {
std::cerr << "Internal error: please include the following info in a bug report:" << std::endl;
for (const auto& [key, value] : params) {
std::cerr << url_encode(key) + "=" + url_encode(value) + "&";
}

View File

@ -59,7 +59,6 @@ std::generator<build> source_package_publishing_history::getBuilds() const {
if (self_link.empty()) { co_return; }
std::map<std::string, std::string> params = {{"ws.op", "getBuilds"}};
std::cout << "Running a getBuilds() operation..." << std::endl;
auto response = lp->api_get(self_link, params);
if (!response.has_value()) { co_return; }