diff --git a/flextype/routes/api/delivery.php b/flextype/routes/api/delivery.php index da9bab25..730c2fef 100644 --- a/flextype/routes/api/delivery.php +++ b/flextype/routes/api/delivery.php @@ -43,7 +43,7 @@ $app->get('/api/entries', function (Request $request, Response $response) use ($ // Set delivery token file if ($delivery_token_file_data = $flextype['parser']->decode(Filesystem::read($delivery_token_file_path), 'yaml')) { if ($delivery_token_file_data['state'] == 'disabled' || - $delivery_token_file_data['limit_calls'] <= $delivery_token_file_data['calls']) { + ($delivery_token_file_data['limit_calls'] != 0 && $delivery_token_file_data['calls'] >= $delivery_token_file_data['limit_calls'])) { return $response->withJson(["detail" => "Incorrect authentication credentials."], 401); } else { // Fetch entry