Merge pull request #815 from dnaka91/fix-validate-basic

Requests: Fix wrong validation in ValidateBasic
This commit is contained in:
tt2468 2021-09-06 06:43:38 -07:00 committed by GitHub
commit 117dcb9567
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ const bool Request::Contains(const std::string keyName) const
const bool Request::ValidateBasic(const std::string keyName, RequestStatus::RequestStatus &statusCode, std::string &comment) const
{
if (HasRequestData) {
if (!HasRequestData) {
statusCode = RequestStatus::MissingRequestData;
comment = "Your request data is missing or invalid (non-object)";
return false;