-
-
Notifications
You must be signed in to change notification settings - Fork 52
/
web.php
349 lines (285 loc) · 19.2 KB
/
web.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
use App\Http\Controllers\Admin\AdminAjaxController;
use App\Http\Controllers\Admin\AdminAnidbController;
use App\Http\Controllers\Admin\AdminBlacklistController;
use App\Http\Controllers\Admin\AdminBookController;
use App\Http\Controllers\Admin\AdminCategoryController;
use App\Http\Controllers\Admin\AdminCategoryRegexesController;
use App\Http\Controllers\Admin\AdminCollectionRegexesController;
use App\Http\Controllers\Admin\AdminCommentsController;
use App\Http\Controllers\Admin\AdminConsoleController;
use App\Http\Controllers\Admin\AdminContentController;
use App\Http\Controllers\Admin\AdminFailedReleasesController;
use App\Http\Controllers\Admin\AdminGameController;
use App\Http\Controllers\Admin\AdminGroupController;
use App\Http\Controllers\Admin\AdminMovieController;
use App\Http\Controllers\Admin\AdminMusicController;
use App\Http\Controllers\Admin\AdminNzbController;
use App\Http\Controllers\Admin\AdminPageController;
use App\Http\Controllers\Admin\AdminPredbController;
use App\Http\Controllers\Admin\AdminReleaseNamingRegexesController;
use App\Http\Controllers\Admin\AdminReleasesController;
use App\Http\Controllers\Admin\AdminRoleController;
use App\Http\Controllers\Admin\AdminShowsController;
use App\Http\Controllers\Admin\AdminSiteController;
use App\Http\Controllers\Admin\AdminTmuxController;
use App\Http\Controllers\Admin\AdminUserController;
use App\Http\Controllers\AdultController;
use App\Http\Controllers\AjaxController;
use App\Http\Controllers\AnimeController;
use App\Http\Controllers\ApiHelpController;
use App\Http\Controllers\Auth\ForgotPasswordController;
use App\Http\Controllers\Auth\LoginController;
use App\Http\Controllers\Auth\RegisterController;
use App\Http\Controllers\Auth\ResetPasswordController;
use App\Http\Controllers\BooksController;
use App\Http\Controllers\BrowseController;
use App\Http\Controllers\BrowseGroupController;
use App\Http\Controllers\BtcPaymentController;
use App\Http\Controllers\CartController;
use App\Http\Controllers\ConsoleController;
use App\Http\Controllers\ContactUsController;
use App\Http\Controllers\ContentController;
use App\Http\Controllers\DetailsController;
use App\Http\Controllers\FailedReleasesController;
use App\Http\Controllers\FileListController;
use App\Http\Controllers\GamesController;
use App\Http\Controllers\GetNzbController;
use App\Http\Controllers\MovieController;
use App\Http\Controllers\MusicController;
use App\Http\Controllers\MyMoviesController;
use App\Http\Controllers\MyShowsController;
use App\Http\Controllers\NfoController;
use App\Http\Controllers\PasswordSecurityController;
use App\Http\Controllers\ProfileController;
use App\Http\Controllers\RssController;
use App\Http\Controllers\SearchController;
use App\Http\Controllers\SeriesController;
use App\Http\Controllers\TermsController;
Auth::routes();
Route::get('/', [ContentController::class, 'show']);
Route::get('register', [RegisterController::class, 'showRegistrationForm']);
Route::post('register', [RegisterController::class, 'register'])->name('register');
Route::get('forgottenpassword', [ForgotPasswordController::class, 'showLinkRequestForm'])->name('forgottenpassword');
Route::post('forgottenpassword', [ForgotPasswordController::class, 'showLinkRequestForm'])->name('forgottenpassword');
Route::get('terms-and-conditions', [TermsController::class, 'terms']);
Route::get('login', [LoginController::class, 'showLoginForm']);
Route::post('login', [LoginController::class, 'login'])->name('login');
Route::get('logout', [LoginController::class, 'logout'])->name('logout');
Route::middleware('isVerified')->group(function () {
Route::get('resetpassword', [ResetPasswordController::class, 'reset']);
Route::post('resetpassword', [ResetPasswordController::class, 'reset']);
Route::get('profile', [ProfileController::class, 'show']);
Route::prefix('browse')->group(function () {
Route::get('tags', [BrowseController::class, 'tags']);
Route::get('group', [BrowseController::class, 'group']);
Route::get('All', [BrowseController::class, 'index']);
Route::get('{parentCategory}/{id?}', [BrowseController::class, 'show'])->middleware('clearance');
});
Route::prefix('cart')->group(function () {
Route::get('index', [CartController::class, 'index']);
Route::post('index', [CartController::class, 'index']);
Route::get('add', [CartController::class, 'store']);
Route::post('add', [CartController::class, 'store']);
Route::get('delete/{id}', [CartController::class, 'destroy']);
Route::post('delete/{id}', [CartController::class, 'destroy']);
});
Route::get('details/{guid}', [DetailsController::class, 'show']);
Route::post('details/{guid}', [DetailsController::class, 'show']);
Route::get('getnzb', [GetNzbController::class, 'getNzb'])->name('getnzb');
Route::post('getnzb', [GetNzbController::class, 'getNzb'])->name('getnzb');
Route::get('rsshelp', [RssController::class, 'showRssDesc'])->name('rsshelp');
Route::post('rsshelp', [RssController::class, 'showRssDesc'])->name('rsshelp');
Route::get('profile', [ProfileController::class, 'show'])->name('profile');
Route::get('apihelp', [ApiHelpController::class, 'index'])->name('apihelp');
Route::get('apiv2help', [ApiHelpController::class, 'apiv2'])->name('apiv2help');
Route::get('browsegroup', [BrowseGroupController::class, 'show'])->name('browsegroup');
Route::get('content', [ContentController::class, 'show'])->name('content');
Route::post('content', [ContentController::class, 'show'])->name('content');
Route::get('failed', [FailedReleasesController::class, 'failed'])->name('failed');
Route::post('failed', [FailedReleasesController::class, 'failed'])->name('failed');
Route::middleware('clearance')->group(function () {
Route::get('Games', [GamesController::class, 'show'])->name('Games');
Route::post('Games', [GamesController::class, 'show'])->name('Games');
Route::get('Movies/{id?}', [MovieController::class, 'showMovies'])->name('Movies');
Route::get('movie', [MovieController::class, 'showMovies'])->name('movie');
Route::get('movietrailers', [MovieController::class, 'showTrailer'])->name('movietrailers');
Route::post('Movies/{id?}', [MovieController::class, 'showMovies'])->name('Movies');
Route::post('movie', [MovieController::class, 'showMovies'])->name('movie');
Route::post('movietrailers', [MovieController::class, 'showTrailer'])->name('movietrailers');
Route::get('Audio/{id?}', [MusicController::class, 'show'])->name('Audio');
Route::post('Audio/{id?}', [MusicController::class, 'show'])->name('Audio');
Route::get('Console/{id?}', [ConsoleController::class, 'show'])->name('Console');
Route::post('Console/{id?}', [ConsoleController::class, 'show'])->name('Console');
Route::get('XXX/{id?}', [AdultController::class, 'show'])->name('XXX');
Route::post('XXX/{id?}', [AdultController::class, 'show'])->name('XXX');
Route::get('anime', [AnimeController::class, 'showAnime'])->name('anime');
Route::post('anime', [AnimeController::class, 'showAnime'])->name('anime');
Route::get('animelist', [AnimeController::class, 'showList'])->name('animelist');
Route::post('animelist', [AnimeController::class, 'showList'])->name('animelist');
Route::get('Books/{id?}', [BooksController::class, 'index'])->name('Books');
Route::post('Books/{id?}', [BooksController::class, 'index'])->name('Books');
});
Route::get('nfo/{id?}', [NfoController::class, 'showNfo'])->name('nfo');
Route::post('nfo/{id?}', [NfoController::class, 'showNfo'])->name('nfo');
Route::get('contact-us', [ContactUsController::class, 'showContactForm'])->name('contact-us');
Route::post('contact-us', [ContactUsController::class, 'contact'])->name('contact-us');
Route::get('profileedit', [ProfileController::class, 'edit'])->name('profileedit');
Route::post('profileedit', [ProfileController::class, 'edit'])->name('profileedit');
Route::get('profile_delete', [ProfileController::class, 'destroy'])->name('profile_delete');
Route::post('profile_delete', [ProfileController::class, 'destroy'])->name('profile_delete');
Route::get('search', [SearchController::class, 'search'])->name('search');
Route::post('search', [SearchController::class, 'search'])->name('search');
Route::get('mymovies', [MyMoviesController::class, 'show'])->name('mymovies');
Route::post('mymovies', [MyMoviesController::class, 'show'])->name('mymovies');
Route::get('myshows', [MyShowsController::class, 'show'])->name('myshows');
Route::post('myshows', [MyShowsController::class, 'show'])->name('myshows');
Route::get('myshows/browse', [MyShowsController::class, 'browse']);
Route::post('myshows/browse', [MyShowsController::class, 'browse']);
Route::get('filelist/{guid}', [FileListController::class, 'show']);
Route::post('filelist/{guid}', [FileListController::class, 'show']);
Route::get('series/{id?}', [SeriesController::class, 'index'])->name('series');
Route::post('series/{id?}', [SeriesController::class, 'index'])->name('series');
Route::get('ajax_profile', [AjaxController::class, 'profile']);
Route::post('ajax_profile', [AjaxController::class, 'profile']);
Route::get('2fa', [PasswordSecurityController::class, 'show2faForm']);
Route::post('generate2faSecret', [PasswordSecurityController::class, 'generate2faSecret'])->name('generate2faSecret');
Route::post('2fa', [PasswordSecurityController::class, 'enable2fa'])->name('enable2fa');
Route::post('disable2fa', [PasswordSecurityController::class, 'disable2fa'])->name('disable2fa');
});
Route::middleware('role:Admin', '2fa')->prefix('admin')->group(function () {
Route::get('index', [AdminPageController::class, 'index']);
Route::get('anidb-delete/{id}', [AdminAnidbController::class, 'destroy']);
Route::post('anidb-delete/{id}', [AdminAnidbController::class, 'destroy']);
Route::get('anidb-edit/{id}', [AdminAnidbController::class, 'edit']);
Route::post('anidb-edit/{id}', [AdminAnidbController::class, 'edit']);
Route::get('anidb-list', [AdminAnidbController::class, 'index']);
Route::post('anidb-list', [AdminAnidbController::class, 'index']);
Route::get('binaryblacklist-list', [AdminBlacklistController::class, 'index']);
Route::post('binaryblacklist-list', [AdminBlacklistController::class, 'index']);
Route::get('binaryblacklist-edit', [AdminBlacklistController::class, 'edit']);
Route::post('binaryblacklist-edit', [AdminBlacklistController::class, 'edit']);
Route::get('book-list', [AdminBookController::class, 'index']);
Route::post('book-list', [AdminBookController::class, 'index']);
Route::get('book-edit', [AdminBookController::class, 'edit']);
Route::post('book-edit', [AdminBookController::class, 'edit']);
Route::get('category-list', [AdminCategoryController::class, 'index']);
Route::post('category-list', [AdminCategoryController::class, 'index']);
Route::get('category-edit', [AdminCategoryController::class, 'edit']);
Route::post('category-edit', [AdminCategoryController::class, 'edit']);
Route::get('user-list', [AdminUserController::class, 'index']);
Route::post('user-list', [AdminUserController::class, 'index']);
Route::get('user-edit', [AdminUserController::class, 'edit']);
Route::post('user-edit', [AdminUserController::class, 'edit']);
Route::get('user-delete', [AdminUserController::class, 'destroy']);
Route::post('user-delete', [AdminUserController::class, 'destroy']);
Route::get('verify', [AdminUserController::class, 'verify']);
Route::post('verify', [AdminUserController::class, 'verify']);
Route::get('resendverification', [AdminUserController::class, 'resendVerification']);
Route::post('resendverification', [AdminUserController::class, 'resendVerification']);
Route::get('site-edit', [AdminSiteController::class, 'edit']);
Route::post('site-edit', [AdminSiteController::class, 'edit']);
Route::get('site-stats', [AdminSiteController::class, 'stats']);
Route::post('site-stats', [AdminSiteController::class, 'stats']);
Route::get('role-list', [AdminRoleController::class, 'index']);
Route::post('role-list', [AdminRoleController::class, 'index']);
Route::get('role-add', [AdminRoleController::class, 'create']);
Route::post('role-add', [AdminRoleController::class, 'create']);
Route::get('role-edit', [AdminRoleController::class, 'edit']);
Route::post('role-edit', [AdminRoleController::class, 'edit']);
Route::get('role-delete', [AdminRoleController::class, 'destroy']);
Route::post('role-delete', [AdminRoleController::class, 'destroy']);
Route::get('content-list', [AdminContentController::class, 'index']);
Route::post('content-list', [AdminContentController::class, 'index']);
Route::get('content-add', [AdminContentController::class, 'create']);
Route::post('content-add', [AdminContentController::class, 'create']);
Route::get('content-delete', [AdminContentController::class, 'destroy']);
Route::post('content-delete', [AdminContentController::class, 'destroy']);
Route::get('category_regexes-list', [AdminCategoryRegexesController::class, 'index']);
Route::post('category_regexes-list', [AdminCategoryRegexesController::class, 'index']);
Route::get('category_regexes-edit', [AdminCategoryRegexesController::class, 'edit']);
Route::post('category_regexes-edit', [AdminCategoryRegexesController::class, 'edit']);
Route::get('collection_regexes-list', [AdminCollectionRegexesController::class, 'index']);
Route::post('collection_regexes-list', [AdminCollectionRegexesController::class, 'index']);
Route::get('collection_regexes-edit', [AdminCollectionRegexesController::class, 'edit']);
Route::post('collection_regexes-edit', [AdminCollectionRegexesController::class, 'edit']);
Route::get('collection_regexes-test', [AdminCollectionRegexesController::class, 'testRegex']);
Route::post('collection_regexes-test', [AdminCollectionRegexesController::class, 'testRegex']);
Route::get('release_naming_regexes-list', [AdminReleaseNamingRegexesController::class, 'index']);
Route::post('release_naming_regexes-list', [AdminReleaseNamingRegexesController::class, 'index']);
Route::get('release_naming_regexes-edit', [AdminReleaseNamingRegexesController::class, 'edit']);
Route::post('release_naming_regexes-edit', [AdminReleaseNamingRegexesController::class, 'edit']);
Route::get('release_naming_regexes-test', [AdminReleaseNamingRegexesController::class, 'testRegex']);
Route::post('release_naming_regexes-test', [AdminReleaseNamingRegexesController::class, 'testRegex']);
Route::get('ajax', [AdminAjaxController::class, 'ajaxAction']);
Route::post('ajax', [AdminAjaxController::class, 'ajaxAction']);
Route::get('tmux-edit', [AdminTmuxController::class, 'edit']);
Route::post('tmux-edit', [AdminTmuxController::class, 'edit']);
Route::get('release-list', [AdminReleasesController::class, 'index']);
Route::post('release-list', [AdminReleasesController::class, 'index']);
Route::get('release-delete/{id}', [AdminReleasesController::class, 'destroy']);
Route::post('release-delete/{id}', [AdminReleasesController::class, 'destroy']);
Route::get('show-list', [AdminShowsController::class, 'index']);
Route::post('show-list', [AdminShowsController::class, 'index']);
Route::get('show-edit', [AdminShowsController::class, 'edit']);
Route::post('show-edit', [AdminShowsController::class, 'edit']);
Route::get('show-remove', [AdminShowsController::class, 'destroy']);
Route::post('show-remove', [AdminShowsController::class, 'destroy']);
Route::get('comments-list', [AdminCommentsController::class, 'index']);
Route::post('comments-list', [AdminCommentsController::class, 'index']);
Route::get('comments-delete/{id}', [AdminCommentsController::class, 'destroy']);
Route::post('comments-delete/{id}', [AdminCommentsController::class, 'destroy']);
Route::get('console-list', [ConsoleController::class, 'index']);
Route::post('console-list', [AdminConsoleController::class, 'index']);
Route::get('console-edit', [AdminConsoleController::class, 'edit']);
Route::post('console-edit', [AdminConsoleController::class, 'edit']);
Route::get('failrel-list', [AdminFailedReleasesController::class, 'index']);
Route::get('game-list', [AdminGameController::class, 'index']);
Route::post('game-list', [AdminGameController::class, 'index']);
Route::get('game-edit', [AdminGameController::class, 'edit']);
Route::post('game-edit', [AdminGameController::class, 'edit']);
Route::get('movie-list', [AdminMovieController::class, 'index']);
Route::post('movie-list', [AdminMovieController::class, 'index']);
Route::get('movie-edit', [AdminMovieController::class, 'edit']);
Route::post('movie-edit', [AdminMovieController::class, 'edit']);
Route::get('movie-add', [AdminMovieController::class, 'create']);
Route::post('movie-add', [AdminMovieController::class, 'create']);
Route::get('music-list', [AdminMusicController::class, 'index']);
Route::post('music-list', [AdminMusicController::class, 'index']);
Route::get('music-edit', [AdminMusicController::class, 'edit']);
Route::post('music-edit', [AdminMusicController::class, 'edit']);
Route::get('nzb-import', [AdminNzbController::class, 'import']);
Route::post('nzb-import', [AdminNzbController::class, 'import']);
Route::get('nzb-export', [AdminNzbController::class, 'export']);
Route::post('nzb-export', [AdminNzbController::class, 'export']);
Route::get('predb', [AdminPredbController::class, 'index']);
Route::post('predb', [AdminPredbController::class, 'index']);
Route::get('group-list', [AdminGroupController::class, 'index']);
Route::post('group-list', [AdminGroupController::class, 'index']);
Route::get('group-edit', [AdminGroupController::class, 'edit']);
Route::post('group-edit', [AdminGroupController::class, 'edit']);
Route::get('group-bulk', [AdminGroupController::class, 'createBulk']);
Route::post('group-bulk', [AdminGroupController::class, 'createBulk']);
Route::get('group-list-active', [AdminGroupController::class, 'active']);
Route::post('group-list-active', [AdminGroupController::class, 'active']);
Route::get('group-list-inactive', [AdminGroupController::class, 'inactive']);
Route::post('group-list-inactive', [AdminGroupController::class, 'inactive']);
});
Route::middleware('role_or_permission:Admin|Moderator|edit release')->prefix('admin')->group(function () {
Route::get('release-edit', [AdminReleasesController::class, 'edit']);
Route::post('release-edit', [AdminReleasesController::class, 'edit']);
});
Route::post('2faVerify', function () {
return redirect()->to(URL()->previous());
})->name('2faVerify')->middleware('2fa');
Route::post('btcpay/webhook', [BtcPaymentController::class, 'btcPayCallback'])->name('btcpay.webhook');