diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-08-11 22:10:49 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-08-24 21:21:40 +0300 |
commit | 9498ebac6eccde201526b9a6131a76c02ca5db62 (patch) | |
tree | 7256f1fc6de4dee185f5cc116e45247cf27f28cb /lib/Controller/AliasesController.php | |
parent | 430500712496242526eed2aedb5afc42d60ca1b9 (diff) |
Rework the routing
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Controller/AliasesController.php')
-rw-r--r-- | lib/Controller/AliasesController.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Controller/AliasesController.php b/lib/Controller/AliasesController.php index cda86bd65..ca9d61589 100644 --- a/lib/Controller/AliasesController.php +++ b/lib/Controller/AliasesController.php @@ -54,9 +54,10 @@ class AliasesController extends Controller { * @TrapError * * @param int $accountId + * * @return JSONResponse */ - public function index($accountId): JSONResponse { + public function index(int $accountId): JSONResponse { return new JSONResponse($this->aliasService->findAll($accountId, $this->currentUser->getUID())); } @@ -83,7 +84,7 @@ class AliasesController extends Controller { * @param int $id * @return JSONResponse */ - public function destroy($id): JSONResponse { + public function destroy(int $id): JSONResponse { return new JSONResponse($this->aliasService->delete($id, $this->currentUser->getUID())); } @@ -94,9 +95,10 @@ class AliasesController extends Controller { * @param int $accountId * @param string $alias * @param string $aliasName + * * @return JSONResponse */ - public function create($accountId, $alias, $aliasName): JSONResponse { + public function create(int $accountId, string $alias, string $aliasName): JSONResponse { return new JSONResponse($this->aliasService->create($accountId, $alias, $aliasName), Http::STATUS_CREATED); } } |