Commit 525fe397 by Vladislav

#21104 Перенос проекта в продакшн

1 parent 57ab2a5d
Showing with 7 additions and 2 deletions
...@@ -65,8 +65,13 @@ class Limits implements \App\Service\Contract\Limits { ...@@ -65,8 +65,13 @@ class Limits implements \App\Service\Contract\Limits {
*/ */
function countObjectsLimit(\App\Service\Contract\APIRequest $request): int function countObjectsLimit(\App\Service\Contract\APIRequest $request): int
{ {
if ($this->current()==0) if ($this->current() == 0) {
if ($this->token->limits()->count() == 0) {
return self::NAN;
}
return 0; return 0;
}
$cost = $this->limitCosts->getCostObject($request); $cost = $this->limitCosts->getCostObject($request);
$maxCount = $request->getMaxCount(); $maxCount = $request->getMaxCount();
...@@ -77,7 +82,7 @@ class Limits implements \App\Service\Contract\Limits { ...@@ -77,7 +82,7 @@ class Limits implements \App\Service\Contract\Limits {
$objectsCount = $request->getObjectsCount(); $objectsCount = $request->getObjectsCount();
if ($this->token->limits->count() > 0){ if ($this->token->limits()->count() > 0){
if ($this->limitCosts->getCostCall($request) > $this->current()){ if ($this->limitCosts->getCostCall($request) > $this->current()){
return 0; return 0;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!