Merge pull request #11803 from LillyJadeKatrin/retroachievements-bugfix

Added Invalid Request Drop to AchievementManager Request
This commit is contained in:
Admiral H. Curtiss 2023-04-29 16:46:59 +02:00 committed by GitHub
commit aaf11e626a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -384,6 +384,8 @@ AchievementManager::ResponseType AchievementManager::Request(
rc_api_request_t api_request; rc_api_request_t api_request;
Common::HttpRequest http_request; Common::HttpRequest http_request;
init_request(&api_request, &rc_request); init_request(&api_request, &rc_request);
if (!api_request.post_data)
return ResponseType::INVALID_REQUEST;
auto http_response = http_request.Post(api_request.url, api_request.post_data); auto http_response = http_request.Post(api_request.url, api_request.post_data);
rc_api_destroy_request(&api_request); rc_api_destroy_request(&api_request);
if (http_response.has_value() && http_response->size() > 0) if (http_response.has_value() && http_response->size() > 0)

View File

@ -26,6 +26,7 @@ public:
{ {
SUCCESS, SUCCESS,
MANAGER_NOT_INITIALIZED, MANAGER_NOT_INITIALIZED,
INVALID_REQUEST,
INVALID_CREDENTIALS, INVALID_CREDENTIALS,
CONNECTION_FAILED, CONNECTION_FAILED,
UNKNOWN_FAILURE UNKNOWN_FAILURE