Added API/Endpoint abstract class
- (re)Added Endpoints folder to both API and Router - fixed syntax in namespaces - xhr.responseJSON is returned to the fail() - fixed Router endpoints (view in browser, cron,...)
This commit is contained in:
24
lib/API/Endpoints/Setup.php
Normal file
24
lib/API/Endpoints/Setup.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
namespace MailPoet\API\Endpoints;
|
||||
use \MailPoet\Config\Activator;
|
||||
|
||||
if(!defined('ABSPATH')) exit;
|
||||
|
||||
class Setup {
|
||||
function __construct() {
|
||||
}
|
||||
|
||||
function reset() {
|
||||
try {
|
||||
$activator = new Activator();
|
||||
$activator->deactivate();
|
||||
$activator->activate();
|
||||
$result = true;
|
||||
} catch(\Exception $e) {
|
||||
$result = false;
|
||||
}
|
||||
return array(
|
||||
'result' => $result
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user