Ensure that the first parameter in all GET calls is prefaced with ?.
continuous-integration/drone/push Build is passing Details

All calls to CURLWrapper::add_parameters_to_uri() but the first used & for all
parameters, because the boolean keeping track was implemented wrong.
This commit is contained in:
tastytea 2020-03-20 16:29:16 +01:00
parent 0bbc6ac4c7
commit b5144fd9ce
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "The type of build.")
option(BUILD_SHARED_LIBS "Build shared libraries." YES)
project(mastodonpp
VERSION 0.5.2
VERSION 0.5.3
DESCRIPTION "C++ wrapper for the Mastodon and Pleroma APIs."
LANGUAGES CXX)

View File

@ -405,6 +405,7 @@ bool CURLWrapper::replace_parameter_in_uri(string &uri,
void CURLWrapper::add_parameters_to_uri(string &uri,
const parametermap &parameters)
{
bool first{true};
// Replace <ID> with the value of parameter “id” and so on.
for (const auto &param : parameters)
{
@ -413,7 +414,6 @@ void CURLWrapper::add_parameters_to_uri(string &uri,
continue;
}
static bool first{true};
if (first)
{
uri += "?";