meraproject/module/pm/project/controller.php
keboss-m 5c21d25d45 Initial commit: Merakomis portal, Docker stack and user-reader API.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 11:04:05 +03:00

38 lines
756 B
PHP

<?
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);
}
}