diff options
author | René Gieling <github@dartcafe.de> | 2020-12-05 15:19:29 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-05 15:19:29 +0300 |
commit | 6cb597c9e8de850a8492d4c76c4781456e11e9a8 (patch) | |
tree | a4ea6c3abb3e568ee28037de3d15bfde9629a734 /appinfo/routes.php | |
parent | 18ab3229485c0281405c560bad04e3c9f7ce511b (diff) |
publicController (#1272)
* move public pages to one publicController
* some more minor refactoring and optimizations
Diffstat (limited to 'appinfo/routes.php')
-rw-r--r-- | appinfo/routes.php | 68 |
1 files changed, 38 insertions, 30 deletions
diff --git a/appinfo/routes.php b/appinfo/routes.php index 2bf8ea7f..96df271a 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -23,56 +23,63 @@ return [ 'routes' => [ + ['name' => 'public#vote_page', 'url' => '/s/{token}', 'verb' => 'GET'], + ['name' => 'public#poll', 'url' => '/s/{token}/poll', 'verb' => 'GET'], + ['name' => 'public#vote', 'url' => '/s/{token}/vote', 'verb' => 'PUT'], + ['name' => 'public#comment', 'url' => '/s/{token}/comment', 'verb' => 'POST'], + ['name' => 'public#comment_delete', 'url' => '/s/{token}/comment/{commentId}', 'verb' => 'DELETE', 'postfix' => 'public'], + ['name' => 'public#subscription', 'url' => '/s/{token}/subscription', 'verb' => 'GET'], + ['name' => 'public#subscribe', 'url' => '/s/{token}/subscribe', 'verb' => 'PUT'], + ['name' => 'public#unsubscribe', 'url' => '/s/{token}/unsubscribe', 'verb' => 'PUT'], + + ['name' => 'public#validate_public_username', 'url' => '/check/username', 'verb' => 'POST'], + ['name' => 'public#validate_email_address', 'url' => '/check/emailaddress/{emailAddress}', 'verb' => 'GET'], + ['name' => 'page#index', 'url' => '/', 'verb' => 'GET'], ['name' => 'page#index', 'url' => '/not-found', 'verb' => 'GET', 'postfix' => 'notfound'], ['name' => 'page#index', 'url' => '/list/{id}', 'verb' => 'GET', 'postfix' => 'list'], ['name' => 'page#vote', 'url' => '/vote/{id}', 'verb' => 'GET'], - ['name' => 'page#vote_public', 'url' => '/s/{token}', 'verb' => 'GET', 'postfix' => 'public'], - ['name' => 'page#vote_public', 'url' => '/poll/{token}', 'verb' => 'GET', 'postfix' => 'oldpublic'], - - ['name' => 'poll#get', 'url' => '/polls/get/{pollId}', 'verb' => 'GET', 'postfix' => 'auth'], - ['name' => 'poll#get', 'url' => '/polls/get/s/{token}', 'verb' => 'GET', 'postfix' => 'public'], - ['name' => 'poll#add', 'url' => '/polls/add', 'verb' => 'POST'], - ['name' => 'poll#update', 'url' => '/polls/update/{pollId}', 'verb' => 'PUT'], - ['name' => 'poll#list', 'url' => '/polls/list', 'verb' => 'GET'], - ['name' => 'poll#delete', 'url' => '/polls/delete/{pollId}', 'verb' => 'GET'], - ['name' => 'poll#deletePermanently', 'url' => '/polls/delete/permanent/{pollId}', 'verb' => 'GET'], - ['name' => 'poll#clone', 'url' => '/polls/clone/{pollId}', 'verb' => 'GET'], - ['name' => 'poll#getParticipantsEmailAddresses', 'url' => '/polls/addresses/{pollId}', 'verb' => 'GET'], - - ['name' => 'option#list', 'url' => '/polls/{pollId}/options', 'verb' => 'GET'], - ['name' => 'option#reorder', 'url' => '/polls/{pollId}/options/reorder', 'verb' => 'POST'], + ['name' => 'poll#list', 'url' => '/polls', 'verb' => 'GET'], + ['name' => 'poll#get', 'url' => '/poll/{pollId}', 'verb' => 'GET'], + ['name' => 'poll#add', 'url' => '/poll/add', 'verb' => 'POST'], + ['name' => 'poll#update', 'url' => '/poll/{pollId}', 'verb' => 'PUT'], + ['name' => 'poll#delete', 'url' => '/poll/{pollId}', 'verb' => 'DELETE'], + + ['name' => 'poll#switchDeleted', 'url' => '/poll/{pollId}/switchDeleted', 'verb' => 'PUT'], + ['name' => 'poll#clone', 'url' => '/poll/{pollId}/clone', 'verb' => 'GET'], + ['name' => 'poll#getParticipantsEmailAddresses', 'url' => '/polls/{pollId}/addresses', 'verb' => 'GET'], + + ['name' => 'option#list', 'url' => '/poll/{pollId}/options', 'verb' => 'GET'], ['name' => 'option#add', 'url' => '/option', 'verb' => 'POST'], ['name' => 'option#update', 'url' => '/option/{optionId}', 'verb' => 'PUT'], ['name' => 'option#delete', 'url' => '/option/{optionId}', 'verb' => 'DELETE'], + + ['name' => 'option#reorder', 'url' => '/poll/{pollId}/options/reorder', 'verb' => 'POST'], ['name' => 'option#confirm', 'url' => '/option/{optionId}/confirm', 'verb' => 'PUT'], ['name' => 'option#sequence', 'url' => '/option/{optionId}/sequence', 'verb' => 'POST'], ['name' => 'option#findCalendarEvents', 'url' => '/option/{optionId}/events', 'verb' => 'GET'], - ['name' => 'vote#set', 'url' => '/vote/set', 'verb' => 'POST'], - ['name' => 'vote#setByToken', 'url' => '/vote/set/s', 'verb' => 'POST'], - ['name' => 'vote#delete', 'url' => '/votes/delete', 'verb' => 'POST'], + ['name' => 'vote#set', 'url' => '/vote', 'verb' => 'PUT'], + ['name' => 'vote#delete', 'url' => '/poll/{pollId}/user/{userId}', 'verb' => 'DELETE'], ['name' => 'share#list', 'url' => '/poll/{pollId}/shares', 'verb' => 'GET'], ['name' => 'share#add', 'url' => '/poll/{pollId}/share', 'verb' => 'POST'], ['name' => 'share#get', 'url' => '/share/{token}', 'verb' => 'GET'], + ['name' => 'share#delete', 'url' => '/share/{token}', 'verb' => 'DELETE'], ['name' => 'share#personal', 'url' => '/share/personal', 'verb' => 'POST'], - ['name' => 'share#delete', 'url' => '/share/delete/{token}', 'verb' => 'DELETE'], - ['name' => 'share#sendInvitation', 'url' => '/share/send/{token}', 'verb' => 'POST'], - ['name' => 'share#resolveGroup', 'url' => '/share/resolveGroup/{token}', 'verb' => 'GET'], + ['name' => 'share#sendInvitation', 'url' => '/share/{token}/invite', 'verb' => 'POST'], + ['name' => 'share#resolveGroup', 'url' => '/share/{token}/resolve', 'verb' => 'GET'], - ['name' => 'subscription#get', 'url' => '/subscription/{pollId}', 'verb' => 'GET', 'postfix' => 'auth'], - ['name' => 'subscription#get', 'url' => '/subscription/s/{token}', 'verb' => 'GET', 'postfix' => 'public'], - ['name' => 'subscription#set', 'url' => '/subscription', 'verb' => 'POST'], + ['name' => 'subscription#get', 'url' => '/poll/{pollId}/subscription', 'verb' => 'GET'], + ['name' => 'subscription#set', 'url' => '/poll/{pollId}/subscription', 'verb' => 'PUT'], + ['name' => 'subscription#subscribe', 'url' => '/poll/{pollId}/subscribe', 'verb' => 'PUT'], + ['name' => 'subscription#unsubscribe', 'url' => '/poll/{pollId}/unsubscribe', 'verb' => 'PUT'], - ['name' => 'comment#add', 'url' => '/comment', 'verb' => 'POST'], + ['name' => 'comment#add', 'url' => '/poll/{pollId}/comment', 'verb' => 'POST'], ['name' => 'comment#delete', 'url' => '/comment/{commentId}', 'verb' => 'DELETE', 'postfix' => 'auth'], - ['name' => 'comment#delete', 'url' => '/comment/s/{token}/{commentId}', 'verb' => 'DELETE', 'postfix' => 'public'], ['name' => 'system#get_site_users_and_groups', 'url' => '/siteusers/get', 'verb' => 'POST'], - ['name' => 'system#validate_public_username', 'url' => '/check/username', 'verb' => 'POST'], - ['name' => 'system#validate_email_address', 'url' => '/check/emailaddress/{emailAddress}', 'verb' => 'GET'], ['name' => 'preferences#write', 'url' => '/preferences/write', 'verb' => 'POST'], ['name' => 'preferences#get', 'url' => '/preferences/get', 'verb' => 'GET'], @@ -81,13 +88,14 @@ return [ // REST-API calls ['name' => 'poll_api#list', 'url' => '/api/v1.0/polls', 'verb' => 'GET'], - ['name' => 'poll_api#get', 'url' => '/api/v1.0/poll/{pollId}', 'verb' => 'GET'], ['name' => 'poll_api#add', 'url' => '/api/v1.0/poll', 'verb' => 'POST'], + ['name' => 'poll_api#get', 'url' => '/api/v1.0/poll/{pollId}', 'verb' => 'GET'], ['name' => 'poll_api#update', 'url' => '/api/v1.0/poll/{pollId}', 'verb' => 'PUT'], ['name' => 'poll_api#delete', 'url' => '/api/v1.0/poll/{pollId}', 'verb' => 'DELETE'], + ['name' => 'poll_api#switchDeleted', 'url' => '/api/v1.0/poll/{pollId}/switchdeleted', 'verb' => 'PUT'], ['name' => 'poll_api#clone', 'url' => '/api/v1.0/poll/{pollId}/clone', 'verb' => 'POST'], ['name' => 'poll_api#trash', 'url' => '/api/v1.0/poll/{pollId}/trash', 'verb' => 'POST'], - ['name' => 'poll_api#getParticipantsEmailAddresses', 'url' => '/api/v1.0/poll/{pollId}/addresses', 'verb' => 'GET'], + ['name' => 'poll_api#get_participants_email_addresses', 'url' => '/api/v1.0/poll/{pollId}/addresses', 'verb' => 'GET'], ['name' => 'poll_api#enum', 'url' => '/api/v1.0/enum/poll', 'verb' => 'GET'], ['name' => 'option_api#list', 'url' => '/api/v1.0/poll/{pollId}/options', 'verb' => 'GET'], |