meraproject/module/pm/project/controller.php

38 lines
756 B
PHP
Raw Normal View History

<?
namespace controller\pm\project;
use ms\ms\structure\msControllerTable;
use pm\Project;
class Api extends msControllerTable {
static $class = 'pm\Project';
static function uadd(){
$res = [];
if(IF_AUTH) {
$_POST['values'] = [
Project::$NAME => $_POST['name'],
];
parent::uadd();
}
}
static function getMyListByAccount(){
$res = [];
if(IF_AUTH){
$r = Project::select([
\Query::WHERE => new \Where(\Where::_operator(Project::$ACCOUNT,'=',UID))
],false);
while($l = \DB::fetch($r)){
$res[] = Project::appFormat($l);
}
}
echo je($res);
}
}