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:
2025-05-04 23:31:13 +02:00
parent 58a7444da2
commit 745f6495d1
9 changed files with 145 additions and 29 deletions

14
api.php
View File

@ -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' => [