user.yaml 4.03 KB
Newer Older
1
user:
Emma's avatar
Emma committed
2
    controller: App\Controller\UserController::userPage
Emma's avatar
Emma committed
3 4 5
    path: /user/{username}
    methods: [GET]

6
user_shortcut:
Emma's avatar
Emma committed
7
    controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController::redirectAction
8
    defaults: { route: user }
Emma's avatar
Emma committed
9 10 11
    path: /u/{username}
    methods: [GET]

12
user_submissions:
Emma's avatar
Emma committed
13
    controller: App\Controller\UserController::submissions
14
    defaults: { page: 1 }
15
    path: /user/{username}/submissions
Emma's avatar
Emma committed
16 17
    methods: [GET]

18
user_comments:
Emma's avatar
Emma committed
19
    controller: App\Controller\UserController::comments
20
    defaults: { page: 1 }
Emma's avatar
Emma committed
21 22 23 24
    path: /user/{username}/comments/{page}
    methods: [GET]
    requirements: { page: \d+ }

25 26 27 28 29 30 31
users:
    controller: App\Controller\UserController::list
    defaults: { page: 1 }
    path: /users/{page}
    methods: [GET]
    requirements: { page: \d+ }

32
edit_user:
Emma's avatar
Emma committed
33
    controller: App\Controller\UserController::editUser
34
    path: /user/{username}/account
Emma's avatar
Emma committed
35 36
    methods: [GET, POST]

Emma's avatar
Emma committed
37
edit_biography:
Emma's avatar
Emma committed
38
    controller: App\Controller\UserController::editBiography
39
    path: /user/{username}/edit_biography
Emma's avatar
Emma committed
40 41
    methods: [GET, POST]

42
user_settings:
Emma's avatar
Emma committed
43
    controller: App\Controller\UserController::userSettings
44
    path: /user/{username}/preferences
Emma's avatar
Emma committed
45 46
    methods: [GET, POST]

47
user_block_list:
Emma's avatar
Emma committed
48
    controller: App\Controller\UserController::blockList
49
    defaults: { page: 1 }
50
    path: /user/{username}/block_list/{page}
Emma's avatar
Emma committed
51 52 53
    methods: [GET, POST]
    requirements: { page: \d+ }

54
block_user:
Emma's avatar
Emma committed
55
    controller: App\Controller\UserController::block
Emma's avatar
Emma committed
56 57 58
    path: /block/{username}
    methods: [GET, POST]

59
unblock_user:
Emma's avatar
Emma committed
60
    controller: App\Controller\UserController::unblock
Emma's avatar
Emma committed
61 62 63 64
    path: /unblock/{id}
    methods: [POST]
    requirements: { id: "%uuid_regex%" }

65
registration:
Emma's avatar
Emma committed
66
    controller: App\Controller\UserController::registration
Emma's avatar
Emma committed
67 68 69
    path: /registration
    methods: [GET, POST]

70
mark_user_trusted:
Emma's avatar
Emma committed
71
    controller: App\Controller\UserController::markAsTrusted
72 73 74 75 76 77 78 79
    defaults: { trusted: true }
    path: /user/{username}/mark_as_trusted
    methods: [POST]

mark_user_untrusted:
    controller: App\Controller\UserController::markAsTrusted
    defaults: { trusted: false }
    path: /user/{username}/mark_as_untrusted
Emma's avatar
Emma committed
80 81
    methods: [POST]

82 83 84
inbox: # legacy redirect
    controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController::redirectAction
    defaults: { page: 1, route: notifications }
Emma's avatar
Emma committed
85 86 87 88
    path: /inbox/{page}
    methods: [GET]
    requirements: { page: \d+ }

89 90 91 92 93 94 95 96 97
notifications:
    controller: App\Controller\UserController::notifications
    defaults: { page: 1 }
    path: /notifications/{page}
    methods: [GET]
    requirements: { page: \d+ }

clear_notifications:
    controller: App\Controller\UserController::clearNotifications
98
    defaults: { _format: html }
99
    path: /clear_notifications.{_format}
Emma's avatar
Emma committed
100 101
    methods: [POST]
    requirements: { _format: html|json }
102 103 104 105 106 107 108

user_forum_bans:
    controller: App\Controller\UserController::listForumBans
    defaults: { page: 1 }
    path: /user/{username}/forum_bans/{page}
    methods: [GET]
    requirements: { username: \w+, page: \d+ }
109 110 111 112 113 114 115

clear_notification:
    controller: App\Controller\UserController::clearNotification
    defaults: { _format: html }
    path: /clear_notification.{_format}
    methods: [POST]
    requirements: { _format: html|json }
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134

hidden_forums:
    controller: App\Controller\UserController::hiddenForums
    defaults: { page: 1 }
    path: /user/{username}/hidden_forums/{page}
    methods: [GET]
    requirements: { username: \w+, page: \d+ }

hide_forum:
    controller: App\Controller\UserController::hideForum
    defaults: { hide: true }
    path: /user/{username}/hide_forum/{forum}
    methods: [POST]

unhide_forum:
    controller: App\Controller\UserController::hideForum
    defaults: { hide: false }
    path: /user/{username}/unhide_forum/{forum}
    methods: [POST]
135 136 137 138 139 140 141 142 143 144 145 146

night_mode_on:
    controller: App\Controller\UserController::toggleNightMode
    defaults: { enabled: true }
    methods: [POST]
    path: /night_mode_on

night_mode_off:
    controller: App\Controller\UserController::toggleNightMode
    defaults: { enabled: false }
    methods: [POST]
    path: /night_mode_off