adds endpoint to query all user ampeln that were assigned after the start_working_date with the appropriate beschreibungs translations

This commit is contained in:
SimonGschnell
2024-07-25 15:16:01 +02:00
parent 1e3146d33f
commit ca6e3a8463
3 changed files with 81 additions and 0 deletions
@@ -31,6 +31,7 @@ class Ampeln extends FHCAPI_Controller
'getAllActiveAmpeln' => self::PERM_LOGGED,
'getConfirmedActiveAmpeln' => self::PERM_LOGGED,
'confirmAmpel' => self::PERM_LOGGED,
'alleAmpeln' => self::PERM_LOGGED,
]);
@@ -128,6 +129,18 @@ class Ampeln extends FHCAPI_Controller
$this->terminateWithSuccess($userAmpeln);
}
public function alleAmpeln(){
$alle_ampeln = $this->AmpelModel->alleAmpeln($this->uid);
if(isError($alle_ampeln)) $this->terminateWithError(getError($alle_ampeln));
$alle_ampeln = $this->getDataOrTerminateWithError($alle_ampeln);
$this->terminateWithSuccess($alle_ampeln);
}