Skip to content

Commit 36488aa

Browse files
committed
automatically prefix /v2 to docblock routes, update controllers
1 parent 84f32be commit 36488aa

18 files changed

Lines changed: 136 additions & 138 deletions

core/controllers/Account.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function __construct()
2929
* @param password
3030
* @return [id, key, key_expiry]
3131
*
32-
* @route POST /v2/account/login
32+
* @route POST /account/login
3333
*/
3434
public function login()
3535
{
@@ -52,7 +52,7 @@ public function login()
5252
*
5353
* @return [id, username]
5454
*
55-
* @route GET /v2/account/uid
55+
* @route GET /account/uid
5656
*/
5757
public function uid()
5858
{
@@ -67,7 +67,7 @@ public function uid()
6767
*
6868
* @return permission_array
6969
*
70-
* @route GET /v2/account/permissions
70+
* @route GET /account/permissions
7171
*/
7272
public function permissions()
7373
{
@@ -92,7 +92,7 @@ public function permissions()
9292
*
9393
* @return group_names_array
9494
*
95-
* @route GET /v2/account/groups
95+
* @route GET /account/groups
9696
*/
9797
public function groups()
9898
{
@@ -106,7 +106,7 @@ public function groups()
106106
/**
107107
* Logout currently logged in user.
108108
*
109-
* @route POST /v2/account/logout
109+
* @route POST /account/logout
110110
*/
111111
public function logout()
112112
{
@@ -129,7 +129,7 @@ public function logout()
129129
*
130130
* @return user_fields_array
131131
*
132-
* @route GET /v2/account/settings
132+
* @route GET /account/settings
133133
*/
134134
public function settings()
135135
{
@@ -157,7 +157,7 @@ public function settings()
157157
* @param dyslexia_friendly_font Boolean set to TRUE for using a dyslexia-friendly font.
158158
* @param sidebar_display_left Boolean set to TRUE when displaying the sidebar on the left side.
159159
*
160-
* @route PUT /v2/account/settings
160+
* @route PUT /account/settings
161161
*/
162162
public function update_settings()
163163
{
@@ -196,7 +196,7 @@ public function update_settings()
196196
*
197197
* @param email
198198
*
199-
* @route POST /v2/account/forgot
199+
* @route POST /account/forgot
200200
*/
201201
public function forgotpass()
202202
{
@@ -221,7 +221,7 @@ public function forgotpass()
221221
* @param email
222222
* @param username
223223
*
224-
* @route POST /v2/account/new
224+
* @route POST /account/new
225225
*/
226226
public function newaccount()
227227
{
@@ -250,7 +250,7 @@ public function newaccount()
250250
*
251251
* @return [id, name, key]
252252
*
253-
* @route POST /v2/account/key
253+
* @route POST /account/key
254254
*/
255255
public function key_new()
256256
{
@@ -277,7 +277,7 @@ public function key_new()
277277
*
278278
* @return is_deleted?
279279
*
280-
* @route DELETE /v2/account/key/(:id:)
280+
* @route DELETE /account/key/(:id:)
281281
*/
282282
public function key_delete()
283283
{
@@ -307,7 +307,7 @@ public function key_delete()
307307
* @param id
308308
* @param permissions
309309
*
310-
* @route PUT /v2/account/key/(:id:)
310+
* @route PUT /account/key/(:id:)
311311
*/
312312
public function key_permissions_save()
313313
{
@@ -332,7 +332,7 @@ public function key_permissions_save()
332332
*
333333
* @return appkeys
334334
*
335-
* @route GET /v2/account/key
335+
* @route GET /account/key
336336
*/
337337
public function key_load()
338338
{
@@ -392,7 +392,7 @@ public function store_all()
392392
/**
393393
* Create a nonce for a one-time GET requests.
394394
*
395-
* @route GET /v2/account/nonce/
395+
* @route GET /account/nonce/
396396
*
397397
* @return nonce
398398
*/

core/controllers/Alerts.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct()
3030
*
3131
* @return alert
3232
*
33-
* @route GET /v2/alerts/(:id:)
33+
* @route GET /alerts/(:id:)
3434
*/
3535
public function get()
3636
{
@@ -56,7 +56,7 @@ public function get()
5656
*
5757
* @return alerts
5858
*
59-
* @route GET /v2/alerts/search/(:player_id:)
59+
* @route GET /alerts/search/(:player_id:)
6060
*/
6161
public function search()
6262
{
@@ -129,8 +129,8 @@ public function get_last_player()
129129
* @param mode
130130
* @param properties Settings if mode is set to voicetrack.
131131
*
132-
* @route POST /v2/alerts
133-
* @route PUT /v2/alerts/(:id:)
132+
* @route POST /alerts
133+
* @route PUT /alerts/(:id:)
134134
*/
135135
public function save()
136136
{
@@ -176,7 +176,7 @@ public function save()
176176
*
177177
* @param id
178178
*
179-
* @route DELETE /v2/alerts/(:id:)
179+
* @route DELETE /alerts/(:id:)
180180
*/
181181
public function delete()
182182
{

core/controllers/ClientSettings.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function __construct()
2828
*
2929
* @return setting_result
3030
*
31-
* @route POST /v2/clientsettings/login-message
31+
* @route POST /clientsettings/login-message
3232
*/
3333
public function set_login_message()
3434
{
@@ -42,7 +42,7 @@ public function set_login_message()
4242
*
4343
* @return client_login_message
4444
*
45-
* @route GET /v2/clientsettings/login-message
45+
* @route GET /clientsettings/login-message
4646
*/
4747
public function get_login_message()
4848
{
@@ -56,7 +56,7 @@ public function get_login_message()
5656
*
5757
* @return setting_result
5858
*
59-
* @route POST /v2/clientsettings/welcome-page
59+
* @route POST /clientsettings/welcome-page
6060
*/
6161
public function set_welcome_page()
6262
{
@@ -70,7 +70,7 @@ public function set_welcome_page()
7070
*
7171
* @return client_welcome_page
7272
*
73-
* @route GET /v2/clientsettings/welcome-page
73+
* @route GET /clientsettings/welcome-page
7474
*/
7575
public function get_welcome_page()
7676
{

core/controllers/Dayparting.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function __construct()
2626
*
2727
* @return restrictions
2828
*
29-
* @route GET /v2/dayparting/search
29+
* @route GET /dayparting/search
3030
*/
3131
public function search()
3232
{
@@ -40,7 +40,7 @@ public function search()
4040
*
4141
* @return restrction
4242
*
43-
* @route GET /v2/dayparting/(:id:)
43+
* @route GET /dayparting/(:id:)
4444
*/
4545
public function get()
4646
{
@@ -61,7 +61,7 @@ public function get()
6161
*
6262
* @return id
6363
*
64-
* @route PUT /v2/dayparting/(:id:)
64+
* @route PUT /dayparting/(:id:)
6565
*/
6666
public function save()
6767
{
@@ -82,7 +82,7 @@ public function save()
8282
*
8383
* @param id
8484
*
85-
* @route DELETE /v2/dayparting/(:id:)
85+
* @route DELETE /dayparting/(:id:)
8686
*/
8787
public function delete()
8888
{

core/controllers/Downloads.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct()
3030
* @param id Media ID
3131
* @param version Media version
3232
*
33-
* @route GET /v2/downloads/media/(:id:)/version/(:version:)
33+
* @route GET /downloads/media/(:id:)/version/(:version:)
3434
*/
3535
public function version()
3636
{
@@ -76,7 +76,7 @@ public function version()
7676
*
7777
* @param id Media ID
7878
*
79-
* @route GET /v2/downloads/media/(:id:)
79+
* @route GET /downloads/media/(:id:)
8080
*/
8181
public function media()
8282
{
@@ -99,7 +99,7 @@ public function media()
9999
*
100100
* @param id Media ID
101101
*
102-
* @route GET /v2/downloads/media/(:id:)/preview/
102+
* @route GET /downloads/media/(:id:)/preview/
103103
*/
104104
public function preview()
105105
{
@@ -170,7 +170,7 @@ public function preview()
170170
*
171171
* @param id Media ID
172172
*
173-
* @route GET /v2/downloads/media/(:id:)/thumbnail/
173+
* @route GET /downloads/media/(:id:)/thumbnail/
174174
*/
175175
public function thumbnail()
176176
{

0 commit comments

Comments
 (0)