2017-12-06 16:41:25 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace api\module;
|
|
|
|
|
|
|
|
|
|
|
|
use \error\core\Error;
|
|
|
|
use \error\core\Err;
|
|
|
|
use \database\core\Repo;
|
|
|
|
use \api\core\AuthSystemDefault;
|
|
|
|
|
|
|
|
|
|
|
|
class dev{
|
|
|
|
|
|
|
|
public function __construct(){}
|
|
|
|
|
|
|
|
public function __destruct(){}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function GET_session_destroy($argv){
|
|
|
|
extract($argv);
|
|
|
|
|
|
|
|
$_SESSION = [];
|
|
|
|
|
|
|
|
return ['notice' => 'reload the website NOW !!'];
|
|
|
|
}
|
|
|
|
|
2017-12-07 15:34:36 +00:00
|
|
|
public function GET_release($argv){
|
|
|
|
extract($argv);
|
|
|
|
|
|
|
|
\chdir(__ROOT__);
|
2017-12-07 16:14:44 +00:00
|
|
|
\exec("git pull origin master", $stdout);
|
|
|
|
\exec("npm update");
|
|
|
|
\exec("npm run build");
|
2017-12-07 15:34:36 +00:00
|
|
|
|
2017-12-07 16:14:44 +00:00
|
|
|
return [ 'stdout' => $stdout];
|
2017-12-07 15:34:36 +00:00
|
|
|
}
|
|
|
|
|
2017-12-06 16:41:25 +00:00
|
|
|
}
|