diff --git a/appinfo/routes.php b/appinfo/routes.php index 9debe1ea..74a0ddbf 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -6,7 +6,7 @@ return [ // API ['name' => 'api#days', 'url' => '/api/days', 'verb' => 'GET'], ['name' => 'api#day', 'url' => '/api/days/{id}', 'verb' => 'GET'], - ['name' => 'api#shared', 'url' => '/api/shared/{folder}', 'verb' => 'GET'], - ['name' => 'api#sharedDay', 'url' => '/api/shared/{folder}/{dayId}', 'verb' => 'GET'], + ['name' => 'api#folder', 'url' => '/api/folder/{folder}', 'verb' => 'GET'], + ['name' => 'api#folderDay', 'url' => '/api/folder/{folder}/{dayId}', 'verb' => 'GET'], ] ]; diff --git a/lib/Controller/ApiController.php b/lib/Controller/ApiController.php index e4569cd8..02dcf123 100644 --- a/lib/Controller/ApiController.php +++ b/lib/Controller/ApiController.php @@ -94,7 +94,7 @@ class ApiController extends Controller { * * @return JSONResponse */ - public function shared(string $folder): JSONResponse { + public function folder(string $folder): JSONResponse { $user = $this->userSession->getUser(); if (is_null($user) || !is_numeric($folder)) { return new JSONResponse([], Http::STATUS_PRECONDITION_FAILED); @@ -110,7 +110,7 @@ class ApiController extends Controller { * * @return JSONResponse */ - public function sharedDay(string $folder, string $dayId): JSONResponse { + public function folderDay(string $folder, string $dayId): JSONResponse { $user = $this->userSession->getUser(); if (is_null($user) || !is_numeric($folder) || !is_numeric($dayId)) { return new JSONResponse([], Http::STATUS_PRECONDITION_FAILED);