Return only simple attributes on PATCH to settings

This commit is contained in:
Piotr Sarnacki 2014-07-30 16:43:43 +02:00
parent b486dbc18d
commit 81abc68621

View File

@ -65,7 +65,7 @@ class Travis::Api::App
# TODO: I would like to have better API here, but leaving this # TODO: I would like to have better API here, but leaving this
# for testing to not waste too much time before I can play with it # for testing to not waste too much time before I can play with it
if settings.save if settings.save
respond_with({ settings: settings.obfuscated }, version: :v2) respond_with({ settings: settings.simple_attributes }, version: :v2)
else else
status 422 status 422
respond_with(settings, type: :validation_error, version: :v2) respond_with(settings, type: :validation_error, version: :v2)