diff --git a/app/Http/routes.php b/app/Http/routes.php index cc16ab6a..838c6c7b 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -72,7 +72,7 @@ Route::group(['prefix' => 'api/v1', 'middleware' => 'json-exceptions'], function Route::get('/tracks/radio-details/{hash}', 'Api\V1\TracksController@getTrackRadioDetails'); Route::post('/tracks/radio-details/{hash}', 'Api\V1\TracksController@getTrackRadioDetails'); - Route::group(['middleware' => 'auth.oauth:ponyfm-upload-track'], function() { + Route::group(['middleware' => 'auth.oauth:ponyfm:tracks:upload'], function() { Route::post('tracks', 'Api\V1\TracksController@postUploadTrack'); Route::get('/tracks/{id}/upload-status', 'Api\V1\TracksController@getUploadStatus'); }); diff --git a/tests/ApiAuthTest.php b/tests/ApiAuthTest.php index ac824531..c0b7bb5e 100644 --- a/tests/ApiAuthTest.php +++ b/tests/ApiAuthTest.php @@ -35,7 +35,7 @@ class ApiAuthTest extends TestCase { $user = factory(User::class)->make(); $accessTokenInfo = new \Poniverse\AccessTokenInfo('nonsense-token'); $accessTokenInfo->setIsActive(true); - $accessTokenInfo->setScopes(['basic', 'ponyfm-upload-track']); + $accessTokenInfo->setScopes(['basic', 'ponyfm:tracks:upload']); $poniverse = Mockery::mock('overload:Poniverse');