Merge pull request #11803 from LillyJadeKatrin/retroachievements-bugfix
Added Invalid Request Drop to AchievementManager Request
This commit is contained in:
commit
aaf11e626a
|
@ -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)
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue