adds getTopic to the new ProfilUpdate FhcAPIController

This commit is contained in:
SimonGschnell
2024-07-18 10:40:30 +02:00
parent 885315c22b
commit 328a46f16d
3 changed files with 11 additions and 4 deletions
@@ -39,7 +39,7 @@ class ProfilUpdate extends FHCAPI_Controller
{
parent::__construct([
'getStatus' => self::PERM_LOGGED,
'fotoSperre' => self::PERM_LOGGED,
'getTopic' => self::PERM_LOGGED,
]);
@@ -94,6 +94,14 @@ class ProfilUpdate extends FHCAPI_Controller
}
public function getTopic()
{
if(!count(self::$TOPICS)){
$this->terminateWithError('No topics found');
}
$this->terminateWithSuccess(self::$TOPICS);
}
}