This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user