32 lines
690 B
PHP
32 lines
690 B
PHP
<?
|
|
|
|
namespace controller\themes\merakomis\dictionary\department;
|
|
|
|
use ms\ms\structure\msControllerTable;
|
|
use themes\merakomis\dictionary\Department;
|
|
use themes\merakomis\Emp;
|
|
use themes\merakomis\structure\merakomisControllerTable;
|
|
|
|
class Api extends merakomisControllerTable {
|
|
|
|
static $class = 'themes\merakomis\dictionary\Department';
|
|
|
|
static function getStructure(){
|
|
$res = [];
|
|
if(Emp::$IS_AUTH) {
|
|
$res = Department::getStructure();
|
|
}
|
|
echo je($res);
|
|
}
|
|
|
|
static function remove(){
|
|
$res = [];
|
|
if(Emp::$IS_AUTH) {
|
|
Department::deleteByID(intval($_POST['id']));
|
|
}
|
|
echo je($res);
|
|
}
|
|
|
|
|
|
|
|
} |