Don't return collections along with simple settings
This commit is contained in:
parent
696185e3cd
commit
9ae3782975
|
@ -46,7 +46,7 @@ class Travis::Api::App
|
|||
get '/:id/settings', scope: :private do
|
||||
settings = service(:find_repo_settings, params).run
|
||||
if settings
|
||||
respond_with({ settings: settings.obfuscated }, version: :v2)
|
||||
respond_with({ settings: settings.simple_attributes }, version: :v2)
|
||||
else
|
||||
status 404
|
||||
end
|
||||
|
|
|
@ -51,6 +51,7 @@ describe 'Repos' do
|
|||
it 'allows to get settings' do
|
||||
response = get "repos/#{repo.id}/settings", {}, headers
|
||||
JSON.parse(response.body)['settings'].should have_key('build_pushes')
|
||||
JSON.parse(response.body)['settings'].should_not have_key('env_vars')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user