mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-28 23:57:59 +01:00
#1: SEARCH IS ALIVE. LET'S GO, YES!
This commit is contained in:
parent
7a005bcf6b
commit
4585eb712e
4 changed files with 2 additions and 9 deletions
|
@ -40,7 +40,6 @@ class TracksController extends ApiControllerBase
|
|||
{
|
||||
session_write_close();
|
||||
|
||||
|
||||
return $this->execute(new UploadTrackCommand(true));
|
||||
}
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ Route::group(['prefix' => 'api/v1', 'middleware' => 'json-exceptions'], function
|
|||
|
||||
Route::group(['prefix' => 'api/web'], function() {
|
||||
Route::get('/taxonomies/all', 'Api\Web\TaxonomiesController@getAll');
|
||||
Route::get('/search', ['middleware' => ['auth', 'can:access-search'], 'uses' => 'Api\Web\SearchController@getSearch']);
|
||||
Route::get('/search', 'Api\Web\SearchController@getSearch');
|
||||
|
||||
Route::get('/tracks', 'Api\Web\TracksController@getIndex');
|
||||
Route::get('/tracks/{id}', 'Api\Web\TracksController@getShow')->where('id', '\d+');
|
||||
|
|
|
@ -48,10 +48,6 @@ class AuthServiceProvider extends ServiceProvider
|
|||
*/
|
||||
public function boot(GateContract $gate)
|
||||
{
|
||||
$gate->define('access-search', function(User $user) {
|
||||
return $user->hasRole('admin') || $user->hasRole('moderator');
|
||||
});
|
||||
|
||||
$gate->define('access-admin-area', function(User $user) {
|
||||
return $user->hasRole('admin');
|
||||
});
|
||||
|
|
|
@ -66,9 +66,7 @@
|
|||
|
||||
<div class="site-body">
|
||||
<ul class="sidebar" ng-controller="sidebar">
|
||||
@can('access-search')
|
||||
<li><pfm-search></pfm-search></li>
|
||||
@endcan
|
||||
<li><pfm-search></pfm-search></li>
|
||||
<li ng-class="{selected: stateIncludes('content.tracks') || stateIncludes('content.track')}"><a href="/tracks">Tracks</a></li>
|
||||
<li ng-class="{selected: stateIncludes('content.albums') || stateIncludes('content.album')}"><a href="/albums">Albums</a></li>
|
||||
<li ng-class="{selected: stateIncludes('content.playlists') || stateIncludes('content.playlist')}"><a href="/playlists">Playlists</a></li>
|
||||
|
|
Loading…
Reference in a new issue