mirror of
https://github.com/koel/koel
synced 2024-11-10 06:34:14 +00:00
chore(api): remove redundant YouTube controller
This commit is contained in:
parent
93651a8e14
commit
6e2f3764cc
2 changed files with 1 additions and 23 deletions
|
@ -1,16 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\V6\API;
|
||||
|
||||
use App\Http\Controllers\API\Controller;
|
||||
use App\Http\Controllers\V6\Requests\YouTubeSearchRequest;
|
||||
use App\Models\Song;
|
||||
use App\Services\YouTubeService;
|
||||
|
||||
class YouTubeSearchController extends Controller
|
||||
{
|
||||
public function __invoke(YouTubeSearchRequest $request, Song $song, YouTubeService $youTubeService)
|
||||
{
|
||||
return $youTubeService->searchVideosRelatedToSong($song, (string) $request->pageToken);
|
||||
}
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
<?php
|
||||
|
||||
use App\Facades\YouTube;
|
||||
use App\Http\Controllers\API\PlaylistController;
|
||||
use App\Http\Controllers\API\UserController;
|
||||
use App\Http\Controllers\V6\API\AlbumController;
|
||||
|
@ -19,7 +18,6 @@ use App\Http\Controllers\V6\API\QueueController;
|
|||
use App\Http\Controllers\V6\API\RecentlyPlayedSongController;
|
||||
use App\Http\Controllers\V6\API\SongController;
|
||||
use App\Http\Controllers\V6\API\SongSearchController;
|
||||
use App\Http\Controllers\V6\API\YouTubeSearchController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::prefix('api')->middleware('api')->group(static function (): void {
|
||||
|
@ -43,7 +41,7 @@ Route::prefix('api')->middleware('api')->group(static function (): void {
|
|||
Route::apiResource('songs', SongController::class)->where(['song' => '[a-f0-9]{32}']);
|
||||
Route::get('songs/recently-played', [RecentlyPlayedSongController::class, 'index']);
|
||||
Route::get('songs/favorite', [FavoriteSongController::class, 'index']);
|
||||
|
||||
|
||||
Route::apiResource('users', UserController::class);
|
||||
|
||||
Route::get('search', ExcerptSearchController::class);
|
||||
|
@ -51,10 +49,6 @@ Route::prefix('api')->middleware('api')->group(static function (): void {
|
|||
|
||||
Route::get('queue/fetch', [QueueController::class, 'fetchSongs']);
|
||||
|
||||
if (YouTube::enabled()) {
|
||||
Route::get('youtube/search/song/{song}', YouTubeSearchController::class);
|
||||
}
|
||||
|
||||
Route::post('interaction/play', [PlayCountController::class, 'store']);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue