Fixed regression on ID parameter parsing
This commit is contained in:
@@ -40,10 +40,8 @@ namespace API::Subsonic
|
||||
for (const std::string& param : it->second)
|
||||
{
|
||||
auto value {StringUtils::readAs<T>(param)};
|
||||
if (!value)
|
||||
throw BadParameterFormatGenericError {paramName};
|
||||
|
||||
res.emplace_back(std::move(*value));
|
||||
if (value)
|
||||
res.emplace_back(std::move(*value));
|
||||
}
|
||||
|
||||
return res;
|
||||
|
||||
@@ -178,17 +178,6 @@ class BadParameterGenericError : public GenericError
|
||||
const std::string _parameterName;
|
||||
};
|
||||
|
||||
class BadParameterFormatGenericError : public GenericError
|
||||
{
|
||||
public:
|
||||
BadParameterFormatGenericError(const std::string& parameterName) : _parameterName {parameterName} {}
|
||||
|
||||
private:
|
||||
std::string getMessage() const override { return "Parameter '" + _parameterName + "': bad format"; }
|
||||
|
||||
const std::string _parameterName;
|
||||
};
|
||||
|
||||
class Response
|
||||
{
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user