| @@ -21,9 +21,9 @@ | ||
| 21 | 21 | { |
| 22 | 22 | $this->client = $client; |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | - public function handle(\WP_REST_Request $request): ?\WP_REST_Response | |
| 25 | + public function handle(\WP_REST_Request $request, callable $next) | |
| 26 | 26 | { |
| 27 | 27 | if (!$this->client->hasAuthentication()) { |
| 28 | 28 | return $this->sendHttpErrorResponse( |
| 29 | 29 | __('Unauthorized. Please log-in into the Metricool plugin.', 'metricool'), |
| @@ -31,7 +31,7 @@ | ||
| 31 | 31 | 401 |
| 32 | 32 | ); |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | - return null; | |
| 35 | + return $next($request); | |
| 36 | 36 | } |
| 37 | 37 | } |