#8: Updated the name of the track upload scope.

This commit is contained in:
Peter Deltchev 2015-12-25 01:25:22 -08:00
parent 7bd336ef55
commit de88fe6fff
2 changed files with 2 additions and 2 deletions

View file

@ -72,7 +72,7 @@ Route::group(['prefix' => 'api/v1', 'middleware' => 'json-exceptions'], function
Route::get('/tracks/radio-details/{hash}', 'Api\V1\TracksController@getTrackRadioDetails'); Route::get('/tracks/radio-details/{hash}', 'Api\V1\TracksController@getTrackRadioDetails');
Route::post('/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::post('tracks', 'Api\V1\TracksController@postUploadTrack');
Route::get('/tracks/{id}/upload-status', 'Api\V1\TracksController@getUploadStatus'); Route::get('/tracks/{id}/upload-status', 'Api\V1\TracksController@getUploadStatus');
}); });

View file

@ -35,7 +35,7 @@ class ApiAuthTest extends TestCase {
$user = factory(User::class)->make(); $user = factory(User::class)->make();
$accessTokenInfo = new \Poniverse\AccessTokenInfo('nonsense-token'); $accessTokenInfo = new \Poniverse\AccessTokenInfo('nonsense-token');
$accessTokenInfo->setIsActive(true); $accessTokenInfo->setIsActive(true);
$accessTokenInfo->setScopes(['basic', 'ponyfm-upload-track']); $accessTokenInfo->setScopes(['basic', 'ponyfm:tracks:upload']);
$poniverse = Mockery::mock('overload:Poniverse'); $poniverse = Mockery::mock('overload:Poniverse');