Files
hstream/routes/user.php
2026-02-18 12:34:10 +01:00

52 lines
3.0 KiB
PHP

<?php
use App\Http\Controllers\HomeController;
use App\Http\Controllers\ProfileController;
use App\Http\Controllers\PlaylistController;
use App\Http\Controllers\Api\UserApiController;
use Illuminate\Support\Facades\Route;
/*
|---------------------------------------------------------------------------------
| User Routes
|---------------------------------------------------------------------------------
*/
// Matrix
Route::get('/join-matrix', [App\Http\Controllers\MatrixController::class, 'index'])->name('join.matrix');
Route::middleware('auth')->group(function () {
// Matrix
Route::post('/join-matrix', [App\Http\Controllers\MatrixController::class, 'store'])->name('join.matrix.create');
Route::get('/user/profile', [ProfileController::class, 'index'])->name('profile.show');
Route::get('/user/comments', [ProfileController::class, 'comments'])->name('profile.comments');
Route::get('/user/likes', [ProfileController::class, 'likes'])->name('profile.likes');
Route::get('/user/watched', [ProfileController::class, 'watched'])->name('user.watched');
// Notifications
Route::get('/user/notifications', [App\Http\Controllers\NotificationController::class, 'index'])->name('profile.notifications');
Route::delete('/user/notifications', [App\Http\Controllers\NotificationController::class, 'delete'])->name('profile.notifications.delete');
// User Profile Actions
Route::get('/user/settings', [ProfileController::class, 'settings'])->name('profile.settings');
Route::patch('/user/settings', [ProfileController::class, 'update'])->name('profile.update');
Route::delete('/user/delete', [ProfileController::class, 'destroy'])->name('profile.delete');
Route::post('/user/settings', [ProfileController::class, 'saveSettings'])->name('profile.settings.save');
Route::get('/user/blacklist', [UserApiController::class, 'getBlacklist'])->name('profile.blacklist');
Route::post('/user/blacklist', [ProfileController::class, 'saveBlacklist'])->name('profile.blacklist.save');
// Playlist Routes for User Page
Route::get('/user/playlists', [PlaylistController::class, 'playlists'])->name('profile.playlists');
Route::get('/user/playlist/{playlist_id}', [PlaylistController::class, 'showPlaylist'])->name('profile.playlist.show');
Route::post('/create-playlist', [PlaylistController::class, 'createPlaylist'])->name('profile.playlists.create');
Route::delete('/user/playlist/{playlist_id}', [PlaylistController::class, 'deletePlaylist'])->name('profile.playlist.delete');
Route::post('/user/playlist-episode', [PlaylistController::class, 'deleteEpisodeFromPlaylist'])->name('playlist.delete.episode');
// Playlist Routes for Modals on Stream Page
Route::post('/hentai/add-to-playlist', [PlaylistController::class, 'addPlaylistApi'])->name('hentai.playlists.add');
Route::post('/hentai/create-playlist', [PlaylistController::class, 'createPlaylistApi'])->name('hentai.playlists.create');
// Download Page
Route::get('/download-search', [HomeController::class, 'downloadSearch'])->name('download.search');
});