diff options
| author | mo khan <mo@mokhan.ca> | 2014-07-05 21:42:42 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-07-05 21:42:42 -0600 |
| commit | dbeff20aa6ef128d46483df835edd33540ce3dd6 (patch) | |
| tree | 33b9a4bbe3772323c61cb8ee874360202ee7db24 /app/controllers/api | |
| parent | de1c35771c70caae026329a10c8faf94babb2541 (diff) | |
remove dead code and tidy up controller action.
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 |
