1
0
mirror of https://github.com/devfake/flox.git synced 2024-11-15 22:52:32 +01:00
flox/backend/routes/web.php

50 lines
2.2 KiB
PHP
Raw Normal View History

2016-10-10 10:57:39 +02:00
<?php
Route::prefix('api')->group(function() {
2016-10-10 10:57:39 +02:00
Route::get('/logout', 'UserController@logout');
Route::post('/login', 'UserController@login');
2016-10-10 10:57:39 +02:00
Route::get('/episodes/{tmdbId}', 'ItemController@episodes');
Route::get('/items/{type}/{orderBy}/{sortDirection}', 'ItemController@items');
2016-10-10 10:57:39 +02:00
Route::get('/search-items', 'ItemController@search');
Route::get('/item/{tmdbId}/{mediaType}', 'SubpageController@item');
Route::get('/imdb-rating/{imdbId}', 'SubpageController@imdbRating');
2016-11-28 08:48:12 +01:00
Route::get('/suggestions/{tmdbID}/{mediaType}', 'TMDBController@suggestions');
2016-10-14 12:15:54 +02:00
Route::get('/trending', 'TMDBController@trending');
2016-10-14 13:25:52 +02:00
Route::get('/upcoming', 'TMDBController@upcoming');
Route::get('/now-playing', 'TMDBController@nowPlaying');
Route::patch('/refresh-all', 'ItemController@refreshAll');
2016-10-19 09:53:35 +02:00
Route::get('/settings', 'SettingController@settings');
Route::middleware('auth')->group(function() {
2017-01-24 16:11:47 +01:00
Route::get('/check-update', 'SettingController@checkForUpdate');
Route::get('/version', 'SettingController@getVersion');
Route::patch('/settings', 'SettingController@updateSettings');
Route::post('/add', 'ItemController@add');
Route::post('/watchlist', 'ItemController@watchlist');
Route::patch('/update-alternative-titles/{tmdbId?}', 'ItemController@updateAlternativeTitles');
Route::patch('/update-genre', 'ItemController@updateGenre');
Route::patch('/toggle-episode/{id}', 'ItemController@toggleEpisode');
Route::patch('/toggle-season', 'ItemController@toggleSeason');
Route::patch('/change-rating/{itemId}', 'ItemController@changeRating');
Route::patch('/refresh/{itemId}', 'ItemController@refresh');
Route::get('/refresh-kickstart-all', 'ItemController@refreshKickstartAll')->middleware('csrf');
2017-04-11 11:28:58 +02:00
Route::delete('/remove/{itemId}', 'ItemController@remove')->middleware('csrf');
2016-10-13 11:11:10 +02:00
Route::get('/userdata', 'UserController@getUserData');
2017-04-11 11:28:58 +02:00
Route::patch('/userdata', 'UserController@changeUserData')->middleware('csrf');
2016-10-10 12:26:55 +02:00
2016-10-10 10:57:39 +02:00
Route::get('/search-tmdb', 'TMDBController@search');
Route::post('/fetch-files', 'FileParserController@call');
Route::get('/video/{type}/{id}', 'VideoController@serve');
2016-10-10 10:57:39 +02:00
});
});
Route::fallback('HomeController@app');