GET stomp API call added
This commit is contained in:
@@ -29,4 +29,13 @@ class API_office_stompjes extends API
|
|||||||
|
|
||||||
$this->apiOutput(200, ['success' => 'Stomp removed.']);
|
$this->apiOutput(200, ['success' => 'Stomp removed.']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getStomp()
|
||||||
|
{
|
||||||
|
list($query, $types, $params) = $this->buildDynamicQuery('office_stompjes');
|
||||||
|
|
||||||
|
$items = $this->generalGetFunction($query, $types, $params, false, 'Stompjes');
|
||||||
|
|
||||||
|
return ($items);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -12,9 +12,15 @@ if (!$GLOBALS['modules_enabled']['office']) {
|
|||||||
echo '405 Not Allowed';
|
echo '405 Not Allowed';
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
if ($API_office_stompjes->request_method === 'GET') {
|
||||||
|
$API_office_stompjes->checkPermissions('office-stompjes', 'RO');
|
||||||
|
|
||||||
if ($API_office_stompjes->request_method === 'POST') {
|
$stompjes = $API_office_stompjes->getStomp();
|
||||||
$API_office_stompjes->checkPermissions('ofice-stompjes-canstomp', 'RW');
|
|
||||||
|
$API_office_stompjes->apiOutput($code = 200, ['success' => $stompjes]);
|
||||||
|
|
||||||
|
} elseif ($API_office_stompjes->request_method === 'POST') {
|
||||||
|
$API_office_stompjes->checkPermissions('office-stompjes-canstomp', 'RW');
|
||||||
|
|
||||||
$API_office_stompjes->return_url = false;
|
$API_office_stompjes->return_url = false;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user