Sha256: 537ec138f856e850253c5d520cb7ef7c36d7897201458462e326ad1c2c36a0a3

Contents?: true

Size: 664 Bytes

Versions: 3

Compression:

Stored size: 664 Bytes

Contents

module Dust
  module Gallery
    module Api
      class PhotosController < AuthenticationController

        respond_to :json

        def show
          respond_with Dust::Gallery::Photo.find(params[:id])
        end

        def create
          file = AppSpecificStringIO.new(params[:qqfile], request.raw_post)
          respond_with Dust::Gallery::Photo.create :filename => file, :album_id => params[:album_id]
        end

        def update
          respond_with Dust::Gallery::Photo.update params[:dust_gallery_photo]
        end

        def destroy
          respond_with Dust::Gallery::Photo.destroy params[:id]
        end

      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dust-cms-0.0.07 app/controllers/dust/gallery/api/photos_controller.rb
dust-cms-0.0.06 app/controllers/dust/gallery/api/photos_controller.rb
dust-cms-0.0.05 app/controllers/dust/gallery/api/photos_controller.rb