uprava API metody update aby bolo mozne aktualizovat len to co je potrebne,
pridany page pre Report, zobrazenie info o reporte s dynamickou editaciou nadpisu a popisu
This commit is contained in:
14
api.php
14
api.php
@ -16,7 +16,7 @@ switch ($action) {
|
||||
$result = array('report_id' => $report_id);
|
||||
break;
|
||||
case 'update':
|
||||
$suc = reportUpdate($_REQUEST['report_id'], $_REQUEST['title'], $_REQUEST['description'], $_REQUEST['status'], $_REQUEST['group'], $_REQUEST['priority']);
|
||||
$suc = reportUpdate($_REQUEST['report_id'], json_decode($_REQUEST['report_data'], true));
|
||||
if ($suc === false) $error = 'Update failed';
|
||||
$result = array('processed' => $suc);
|
||||
break;
|
||||
@ -84,11 +84,13 @@ function help()
|
||||
'description' => 'Update report',
|
||||
'params' => [
|
||||
'report_id' => 'Report id',
|
||||
'title' => 'Report title',
|
||||
'description' => 'Report description',
|
||||
'status' => 'Report status',
|
||||
'group' => 'Report group',
|
||||
'priority' => 'Report priority',
|
||||
'report_data' => [
|
||||
'title' => 'Report title',
|
||||
'description' => 'Report description',
|
||||
'status' => 'Report status',
|
||||
'group' => 'Report group',
|
||||
'priority' => 'Report priority',
|
||||
]
|
||||
]
|
||||
],
|
||||
'delete' => [
|
||||
|
||||
Reference in New Issue
Block a user