Rename shared api
parent
3c0858b706
commit
37002f1721
|
@ -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'],
|
||||
]
|
||||
];
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue