bugfix: Made sure that arrays are send as arrays when they only have 1 entry
This applies to account_ids, exclude_types, and media_ids
This commit is contained in:
parent
8f30451ec1
commit
eaff505f15
|
@ -114,8 +114,15 @@ const curlpp::Forms API::maptoformdata(const parametermap &map)
|
|||
}
|
||||
else
|
||||
{
|
||||
string key = it.first;
|
||||
if (key == "account_ids" ||
|
||||
key == "exclude_types" ||
|
||||
key == "media_ids")
|
||||
{
|
||||
key += "[]";
|
||||
}
|
||||
formdata.push_back(
|
||||
new curlpp::FormParts::Content(it.first, it.second.front()));
|
||||
new curlpp::FormParts::Content(key, it.second.front()));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Reference in New Issue