Separate checking and storing of the keys [MAILPOET-939]

This commit is contained in:
stoletniy
2017-06-15 13:00:56 +03:00
parent 181d7b9876
commit 1aba3112e9
8 changed files with 185 additions and 69 deletions

View File

@ -30,6 +30,7 @@ class Services extends APIEndpoint {
try {
$result = $this->bridge->checkMSSKey($key);
$this->bridge->storeMSSKeyAndState($key, $result);
} catch(\Exception $e) {
return $this->errorResponse(array(
$e->getCode() => $e->getMessage()
@ -79,6 +80,7 @@ class Services extends APIEndpoint {
try {
$result = $this->bridge->checkPremiumKey($key);
$this->bridge->storePremiumKeyAndState($key, $result);
} catch(\Exception $e) {
return $this->errorResponse(array(
$e->getCode() => $e->getMessage()