/var/www/vhosts/ihelp.ro/ajutam.ro/wp-content/plugins/give/src/API/Endpoints/Logs
NameSizeModeActions
Endpoint.php9230644editdlrm
FlushLogs.php16300644editdlrm
GetLogs.php57290644editdlrm
Edit: /var/www/vhosts/ihelp.ro/ajutam.ro/wp-content/plugins/give/src/API/Endpoints/Logs/FlushLogs.php (1630B)
logRepository = $repository; } /** * @inheritDoc */ public function registerRoute() { register_rest_route( 'give-api/v2', $this->endpoint, [ [ 'methods' => 'DELETE', 'callback' => [$this, 'handleRequest'], 'permission_callback' => [$this, 'permissionsCheck'], 'args' => [], ], 'schema' => [$this, 'getSchema'], ] ); } /** * @return array */ public function getSchema() { return [ '$schema' => 'http://json-schema.org/draft-04/schema#', 'title' => 'logs', 'type' => 'object', 'properties' => [], ]; } /** * @param WP_REST_Request $request * * @return WP_REST_Response */ public function handleRequest(WP_REST_Request $request) { $this->logRepository->flushLogs(); return new WP_REST_Response(['status' => true]); } }