diff options
Diffstat (limited to 'app/controllers/api')
| -rw-r--r-- | app/controllers/api/v1/photos_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/api/v1/photos_controller.rb b/app/controllers/api/v1/photos_controller.rb index 6a9d12a2..99fae4e1 100644 --- a/app/controllers/api/v1/photos_controller.rb +++ b/app/controllers/api/v1/photos_controller.rb @@ -3,6 +3,10 @@ module Api class PhotosController < ApiController respond_to :json + def index + respond_with(@photos = current_user.creations.find(params[:cake_id]).photos) + end + def create cake_id = params[:cake_id] UploadPhoto.new.run(cake_id, params) |
