/t endpoint

This commit is contained in:
Pablo Ferreiro 2022-06-12 12:50:16 +02:00
parent 59029e48ad
commit 26bde1e4a8
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
2 changed files with 3 additions and 6 deletions

View file

@ -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);

View file

@ -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');