2016-10-10 10:57:39 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
Route::group(['prefix' => 'api'], function() {
|
|
|
|
Route::post('/login', 'UserController@login');
|
|
|
|
Route::get('/logout', 'UserController@logout');
|
|
|
|
|
|
|
|
Route::get('/items/{orderBy}', 'ItemController@items');
|
|
|
|
Route::get('/search-items', 'ItemController@search');
|
|
|
|
|
2016-10-13 11:11:10 +02:00
|
|
|
Route::get('/suggestions/{tmdbID}', 'TMDBController@suggestions');
|
2016-10-10 15:14:57 +02:00
|
|
|
|
2016-10-10 10:57:39 +02:00
|
|
|
Route::group(['middleware' => 'auth'], function() {
|
2016-10-13 11:11:10 +02:00
|
|
|
Route::get('/export', 'ItemController@export');
|
|
|
|
Route::post('/import', 'ItemController@import');
|
|
|
|
|
2016-10-10 15:14:57 +02:00
|
|
|
Route::get('/get-userdata', 'UserController@userData');
|
2016-10-10 15:18:57 +02:00
|
|
|
Route::patch('/change-userdata', 'UserController@changeUserData');
|
2016-10-10 12:26:55 +02:00
|
|
|
|
2016-10-10 10:57:39 +02:00
|
|
|
Route::get('/search-tmdb', 'TMDBController@search');
|
|
|
|
Route::post('/add', 'ItemController@add');
|
|
|
|
Route::patch('/change-rating/{itemID}', 'ItemController@changeRating');
|
|
|
|
Route::delete('/remove/{itemID}', 'ItemController@remove');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
Route::get('/{uri?}', function($uri = null) {
|
|
|
|
return view('app');
|
|
|
|
})->where('uri', '(.*)');
|