Fixed regression on ID parameter parsing

This commit is contained in:
emeric
2021-09-23 13:21:24 +02:00
parent 2ebc4280a0
commit 5aa0e835cd
2 changed files with 2 additions and 15 deletions
+1 -3
View File
@@ -40,9 +40,7 @@ namespace API::Subsonic
for (const std::string& param : it->second) for (const std::string& param : it->second)
{ {
auto value {StringUtils::readAs<T>(param)}; auto value {StringUtils::readAs<T>(param)};
if (!value) if (value)
throw BadParameterFormatGenericError {paramName};
res.emplace_back(std::move(*value)); res.emplace_back(std::move(*value));
} }
@@ -178,17 +178,6 @@ class BadParameterGenericError : public GenericError
const std::string _parameterName; 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 class Response
{ {
public: public: