mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-11-28 10:30:42 +00:00
fix line indenting
This commit is contained in:
parent
92ce4ff1bc
commit
3388a14793
|
|
@ -2324,6 +2324,22 @@ class RestapiController { /* {{{ */
|
|||
return $response->withJson(array('success'=>true, 'message'=>'', 'data'=>''), 200);
|
||||
} /* }}} */
|
||||
|
||||
function getStatsTotal($request, $response) { /* {{{ */
|
||||
$dms = $this->container->dms;
|
||||
$userobj = $this->container->userobj;
|
||||
$check = $this->checkIfAdmin($request, $response);
|
||||
if($check !== true)
|
||||
return $check;
|
||||
|
||||
$data = [];
|
||||
foreach(array('docstotal', 'folderstotal', 'userstotal') as $type) {
|
||||
$total = $dms->getStatisticalData($type);
|
||||
$data[$type] = $total;
|
||||
}
|
||||
|
||||
return $response->withJson(array('success'=>true, 'message'=>'', 'data'=>$data), 200);
|
||||
} /* }}} */
|
||||
|
||||
} /* }}} */
|
||||
|
||||
class TestController { /* {{{ */
|
||||
|
|
@ -2512,6 +2528,7 @@ $app->put('/categories/{id}/name', \RestapiController::class.':changeCategoryNam
|
|||
$app->get('/attributedefinitions', \RestapiController::class.':getAttributeDefinitions');
|
||||
$app->put('/attributedefinitions/{id}/name', \RestapiController::class.':changeAttributeDefinitionName');
|
||||
$app->get('/echo/{data}', \TestController::class.':echoData');
|
||||
$app->get('/statstotal', \RestapiController::class.':getStatsTotal');
|
||||
$app->run();
|
||||
|
||||
?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user