Files
danbooru/app/controllers/media_assets_controller.rb
evazion b068c113a8 Add MediaAsset model.
A MediaAsset represents an image or video file uploaded to Danbooru. It
stores the metadata associated with the image or video. This is to work
on decoupling files from posts so that images can be uploaded separately
from posts.
2021-09-02 06:07:52 -05:00

9 lines
243 B
Ruby

class MediaAssetsController < ApplicationController
respond_to :json, :xml
def index
@media_assets = authorize MediaAsset.visible(CurrentUser.user).paginated_search(params, count_pages: true)
respond_with(@media_assets)
end
end