This commit is contained in:
2026-03-27 01:01:47 +09:00
parent e8be071064
commit e40f7a3620
4 changed files with 212 additions and 23 deletions
@@ -7,7 +7,7 @@ class WikiAssetsController < ApplicationController
page = WikiPage.find_by(id: page_id)
return head :not_found unless page
render json: page.assets
render json: WikiAssetRepr.many(page.assets)
end
def create
@@ -34,6 +34,6 @@ class WikiAssetsController < ApplicationController
page.update!(next_asset_no: no + 1)
end
render json: asset.as_json(only: [:wiki_page_id, :no], methods: [:url])
render json: WikiAssetRepr.base(asset)
end
end