/t endpoint
This commit is contained in:
parent
59029e48ad
commit
26bde1e4a8
|
@ -1,9 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
namespace App\Controllers;
|
namespace App\Controllers;
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Please use UserController::video instead
|
|
||||||
*/
|
|
||||||
class VideoController {
|
class VideoController {
|
||||||
static public function get(string $video_id) {
|
static public function get(string $video_id) {
|
||||||
UserController::video('placeholder', $video_id);
|
UserController::video('placeholder', $video_id);
|
||||||
|
|
|
@ -34,10 +34,10 @@ $router->mount('/@([^/]+)', function () use ($router) {
|
||||||
$router->get('/rss', 'UserController@rss');
|
$router->get('/rss', 'UserController@rss');
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
// Deprecated, please use /@USERNAME/video/VIDEO_ID instead
|
||||||
* @deprecated Please use /@username/video/id instead
|
|
||||||
*/
|
|
||||||
$router->get('/video/(\w+)', 'VideoController@get');
|
$router->get('/video/(\w+)', 'VideoController@get');
|
||||||
|
// Workaround that allows /t endpoints
|
||||||
|
$router->get('/t/([^/]+)', 'VideoController@get');
|
||||||
|
|
||||||
$router->mount('/tag/([^/]+)', function () use ($router) {
|
$router->mount('/tag/([^/]+)', function () use ($router) {
|
||||||
$router->get('/', 'TagController@get');
|
$router->get('/', 'TagController@get');
|
||||||
|
|
Loading…
Reference in a new issue