main/build/api/module/dev.php

40 lines
596 B
PHP

<?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 !!'];
}
public function GET_release($argv){
extract($argv);
\chdir(__ROOT__);
\exec("git pull origin master", $out_pull);
\exec("npm update");
\exec("npm run build", $out_npm);
return [ 'stdout' => [ $out_pull, $out_update ] ];
}
}