]> git.mxchange.org Git - friendica.git/blobdiff - static/routes.config.php
Partly revert coding for compatibility issues
[friendica.git] / static / routes.config.php
index daa16293765b4f84af23c1dbb3453fef1005cb8d..3991ec4e36aa4bf5689fa50e53f1a63245e9ab85 100644 (file)
@@ -1,17 +1,35 @@
 <?php
+/**
+ * @copyright Copyright (C) 2020, Friendica
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ * Configuration for the default routes in Friendica
+ *
+ * The syntax is either
+ * - 'route' => [ Module::class , [ HTTPMethod(s) ] ]
+ * - 'group' => [ 'route' => [ Module::class, [ HTTPMethod(s) ] ]
+ *
+ * It's possible to create recursive groups
+ *
+ */
 
 use Friendica\App\Router as R;
 use Friendica\Module;
 
-/**
-* Configuration for the default routes in Friendica
-*
-* The syntax is either
-* - 'route' => [ Module::class , [ HTTPMethod(s) ] ]
-* - 'group' => [ 'route' => [ Module::class, [ HTTPMethod(s) ] ]
-*
-* It's possible to create recursive groups
-*/
 return [
        '/' => [Module\Home::class, [R::GET]],
 
@@ -19,6 +37,7 @@ return [
                '/host-meta'      => [Module\WellKnown\HostMeta::class,     [R::GET]],
                '/nodeinfo'       => [Module\WellKnown\NodeInfo::class,     [R::GET]],
                '/webfinger'      => [Module\Xrd::class,                    [R::GET]],
+               '/x-nodeinfo2'    => [Module\NodeInfo210::class,            [R::GET]],
                '/x-social-relay' => [Module\WellKnown\XSocialRelay::class, [R::GET]],
        ],
 
@@ -29,11 +48,20 @@ return [
 
        '/api' => [
                '/v1' => [
+                       '/custom_emojis'                     => [Module\Api\Mastodon\CustomEmojis::class,   [R::GET         ]],
                        '/follow_requests'                   => [Module\Api\Mastodon\FollowRequests::class, [R::GET         ]],
                        '/follow_requests/{id:\d+}/{action}' => [Module\Api\Mastodon\FollowRequests::class, [        R::POST]],
-                       '/instance'                          => [Module\Api\Mastodon\Instance::class, [R::GET]],
-                       '/instance/peers'                    => [Module\Api\Mastodon\Instance\Peers::class, [R::GET]],
+                       '/instance'                          => [Module\Api\Mastodon\Instance::class,       [R::GET         ]],
+                       '/instance/peers'                    => [Module\Api\Mastodon\Instance\Peers::class, [R::GET         ]],
+               ],
+               '/friendica' => [
+                       '/profile/show'                      => [Module\Api\Friendica\Profile\Show::class , [R::GET         ]],
+                       '/events'                            => [Module\Api\Friendica\Events\Index::class , [R::GET         ]],
                ],
+               '/followers/ids'                         => [Module\Api\Twitter\FollowersIds::class   , [R::GET         ]],
+               '/followers/list'                        => [Module\Api\Twitter\FollowersList::class  , [R::GET         ]],
+               '/friends/ids'                           => [Module\Api\Twitter\FriendsIds::class     , [R::GET         ]],
+               '/friends/list'                          => [Module\Api\Twitter\FriendsList::class    , [R::GET         ]],
        ],
 
        '/admin'               => [
@@ -75,34 +103,41 @@ return [
        ],
        '/amcd'                => [Module\AccountManagementControlDocument::class, [R::GET]],
        '/acctlink'            => [Module\Acctlink::class,     [R::GET]],
-       '/allfriends/{id:\d+}' => [Module\AllFriends::class,   [R::GET]],
        '/apps'                => [Module\Apps::class,         [R::GET]],
        '/attach/{item:\d+}'   => [Module\Attach::class,       [R::GET]],
        '/babel'               => [Module\Debug\Babel::class,  [R::GET, R::POST]],
+       '/debug/ap'            => [Module\Debug\ActivityPubConversion::class,  [R::GET, R::POST]],
        '/bookmarklet'         => [Module\Bookmarklet::class,  [R::GET]],
+
+       '/community[/{content}[/{accounttype}]]' => [Module\Conversation\Community::class, [R::GET]],
+
        '/compose[/{type}]'    => [Module\Item\Compose::class, [R::GET, R::POST]],
 
        '/contact'   => [
-               '[/]'                     => [Module\Contact::class,           [R::GET]],
-               '/{id:\d+}[/]'            => [Module\Contact::class,           [R::GET, R::POST]],
-               '/{id:\d+}/archive'       => [Module\Contact::class,           [R::GET]],
-               '/{id:\d+}/block'         => [Module\Contact::class,           [R::GET]],
-               '/{id:\d+}/conversations' => [Module\Contact::class,           [R::GET]],
-               '/{id:\d+}/drop'          => [Module\Contact::class,           [R::GET]],
-               '/{id:\d+}/ignore'        => [Module\Contact::class,           [R::GET]],
-               '/{id:\d+}/posts'         => [Module\Contact::class,           [R::GET]],
-               '/{id:\d+}/update'        => [Module\Contact::class,           [R::GET]],
-               '/{id:\d+}/updateprofile' => [Module\Contact::class,           [R::GET]],
-               '/archived'               => [Module\Contact::class,           [R::GET]],
-               '/batch'                  => [Module\Contact::class,           [R::GET, R::POST]],
-               '/pending'                => [Module\Contact::class,           [R::GET]],
-               '/blocked'                => [Module\Contact::class,           [R::GET]],
-               '/hidden'                 => [Module\Contact::class,           [R::GET]],
-               '/ignored'                => [Module\Contact::class,           [R::GET]],
-               '/hovercard'              => [Module\Contact\Hovercard::class, [R::GET]],
+               '[/]'                         => [Module\Contact::class,           [R::GET]],
+               '/{id:\d+}[/]'                => [Module\Contact::class,           [R::GET, R::POST]],
+               '/{id:\d+}/archive'           => [Module\Contact::class,           [R::GET]],
+               '/{id:\d+}/advanced'          => [Module\Contact\Advanced::class,  [R::GET, R::POST]],
+               '/{id:\d+}/block'             => [Module\Contact::class,           [R::GET]],
+               '/{id:\d+}/conversations'     => [Module\Contact::class,           [R::GET]],
+               '/{id:\d+}/contacts[/{type}]' => [Module\Contact\Contacts::class,  [R::GET]],
+               '/{id:\d+}/drop'              => [Module\Contact::class,           [R::GET]],
+               '/{id:\d+}/ignore'            => [Module\Contact::class,           [R::GET]],
+               '/{id:\d+}/poke'              => [Module\Contact\Poke::class,      [R::GET, R::POST]],
+               '/{id:\d+}/posts'             => [Module\Contact::class,           [R::GET]],
+               '/{id:\d+}/update'            => [Module\Contact::class,           [R::GET]],
+               '/{id:\d+}/updateprofile'     => [Module\Contact::class,           [R::GET]],
+               '/archived'                   => [Module\Contact::class,           [R::GET]],
+               '/batch'                      => [Module\Contact::class,           [R::GET, R::POST]],
+               '/pending'                    => [Module\Contact::class,           [R::GET]],
+               '/blocked'                    => [Module\Contact::class,           [R::GET]],
+               '/hidden'                     => [Module\Contact::class,           [R::GET]],
+               '/ignored'                    => [Module\Contact::class,           [R::GET]],
+               '/hovercard'                  => [Module\Contact\Hovercard::class, [R::GET]],
        ],
 
-       '/credits'   => [Module\Credits::class,          [R::GET]],
+       '/credits'               => [Module\Credits::class,        [R::GET]],
+
        '/delegation'=> [Module\Delegation::class,       [R::GET, R::POST]],
        '/dirfind'   => [Module\Search\Directory::class, [R::GET]],
        '/directory' => [Module\Directory::class,        [R::GET]],
@@ -128,6 +163,8 @@ return [
        '/following/{owner}' => [Module\Following::class,       [R::GET]],
        '/friendica[/json]'  => [Module\Friendica::class,       [R::GET]],
 
+       '/fsuggest/{contact:\d+}' => [Module\FriendSuggest::class,  [R::GET, R::POST]],
+
        '/group'              => [
                '[/]'                        => [Module\Group::class, [R::GET, R::POST]],
                '/{group:\d+}'               => [Module\Group::class, [R::GET, R::POST]],
@@ -164,9 +201,15 @@ return [
        '/manifest'           => [Module\Manifest::class,        [R::GET]],
        '/modexp/{nick}'      => [Module\PublicRSAKey::class,    [R::GET]],
        '/newmember'          => [Module\Welcome::class,         [R::GET]],
-       '/nodeinfo/{version}' => [Module\NodeInfo::class,        [R::GET]],
+       '/nodeinfo/1.0'       => [Module\NodeInfo110::class,     [R::GET]],
+       '/nodeinfo/2.0'       => [Module\NodeInfo120::class,     [R::GET]],
        '/nogroup'            => [Module\Group::class,           [R::GET]],
 
+       '/noscrape' => [
+               '/{nick}'         => [Module\NoScrape::class, [R::GET]],
+               '/{profile}/view' => [Module\NoScrape::class, [R::GET]],
+       ],
+
        '/notifications' => [
                '/network[/json]'    => [Module\Notifications\Notifications::class, [R::GET, R::POST]],
                '/system[/json]'     => [Module\Notifications\Notifications::class, [R::GET, R::POST]],
@@ -178,11 +221,11 @@ return [
        ],
 
        '/notification'         => [
-               '[/]'            => [Module\Notifications\Notification::class, [R::GET]],
-               '/view/{id:\d+}' => [Module\Notifications\Notification::class, [R::GET]],
-               '/mark/all'      => [Module\Notifications\Notification::class, [R::GET]],
+               '[/]'       => [Module\Notifications\Notification::class, [R::GET]],
+               '/mark/all' => [Module\Notifications\Notification::class, [R::GET]],
+               '/{id:\d+}' => [Module\Notifications\Notification::class, [R::GET, R::POST]],
        ],
-       '/objects/{guid}' => [Module\Objects::class, [R::GET]],
+       '/objects/{guid}[/{activity}]' => [Module\Objects::class, [R::GET]],
 
        '/oembed'         => [
                '/b2h'    => [Module\Oembed::class, [R::GET]],
@@ -194,6 +237,8 @@ return [
        '/openid'         => [Module\Security\OpenID::class, [R::GET]],
        '/opensearch'     => [Module\OpenSearch::class,      [R::GET]],
 
+       '/permission/tooltip/{type}/{id:\d+}' => [Module\PermissionTooltip::class, [R::GET]],
+
        '/photo' => [
                '/{name}'                    => [Module\Photo::class, [R::GET]],
                '/{type}/{name}'             => [Module\Photo::class, [R::GET]],
@@ -206,6 +251,8 @@ return [
 
        '/profile' => [
                '/{nickname}'                                         => [Module\Profile\Index::class,    [R::GET]],
+               '/{nickname}/profile'                                 => [Module\Profile\Profile::class,  [R::GET]],
+               '/{nickname}/contacts/common'                         => [Module\Profile\Common::class,   [R::GET]],
                '/{nickname}/contacts[/{type}]'                       => [Module\Profile\Contacts::class, [R::GET]],
                '/{nickname}/status[/{category}[/{date1}[/{date2}]]]' => [Module\Profile\Status::class,   [R::GET]],
        ],
@@ -237,6 +284,7 @@ return [
                        '/verify'       => [Module\Settings\TwoFactor\Verify::class,      [R::GET, R::POST]],
                ],
                '/delegation[/{action}/{user_id}]' => [Module\Settings\Delegation::class,       [R::GET, R::POST]],
+               '/display'                 => [Module\Settings\Display::class,             [R::GET, R::POST]],
                '/profile' => [
                        '[/]'                  => [Module\Settings\Profile\Index::class,       [R::GET, R::POST]],
                        '/photo[/new]'         => [Module\Settings\Profile\Photo\Index::class, [R::GET, R::POST]],
@@ -247,6 +295,7 @@ return [
 
        '/randprof'                      => [Module\RandomProfile::class,         [R::GET]],
        '/register'                      => [Module\Register::class,              [R::GET, R::POST]],
+       '/remote_follow/{profile}'       => [Module\RemoteFollow::class,          [R::GET, R::POST]],
        '/robots.txt'                    => [Module\RobotsTxt::class,             [R::GET]],
        '/rsd.xml'                       => [Module\ReallySimpleDiscovery::class, [R::GET]],
        '/smilies[/json]'                => [Module\Smilies::class,               [R::GET]],
@@ -255,10 +304,12 @@ return [
        '/toggle_mobile'                 => [Module\ToggleMobile::class,          [R::GET]],
        '/tos'                           => [Module\Tos::class,                   [R::GET]],
 
+       '/update_community[/{content}[/{accounttype}]]' => [Module\Update\Community::class, [R::GET]],
        '/update_profile'                => [Module\Update\Profile::class,        [R::GET]],
 
        '/view/theme/{theme}/style.pcss' => [Module\Theme::class,                 [R::GET]],
        '/viewsrc/{item:\d+}'            => [Module\Debug\ItemBody::class,        [R::GET]],
        '/webfinger'                     => [Module\Debug\WebFinger::class,       [R::GET]],
        '/xrd'                           => [Module\Xrd::class,                   [R::GET]],
+       '/worker'                        => [Module\Worker::class,                [R::GET]],
 ];