diff options
Diffstat (limited to 'app/controllers/api')
| -rw-r--r-- | app/controllers/api/v1/photos_controller.rb | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/app/controllers/api/v1/photos_controller.rb b/app/controllers/api/v1/photos_controller.rb index 2e4d9709..49c60f04 100644 --- a/app/controllers/api/v1/photos_controller.rb +++ b/app/controllers/api/v1/photos_controller.rb @@ -12,16 +12,7 @@ module Api end def create - cake_id = params[:cake_id] - UploadPhoto.new.run(cake_id, params) - @photo = Creation.find(cake_id).photos.last - respond_with(@photo) - end - - private - - def photo_params - params.require(:photo).permit(:image, :watermark) + respond_with(@photo = UploadPhoto.new.run(params[:cake_id], params)) end end end |
