新增:数据集文件分页
This commit is contained in:
parent
8ac9592195
commit
7d560032b0
|
@ -22,7 +22,7 @@ class Api::V1::Projects::DatasetsController < Api::V1::BaseController
|
|||
end
|
||||
|
||||
def show
|
||||
@attachments = @project_dataset.attachments.includes(:author)
|
||||
@attachments = kaminari_paginate(@project_dataset.attachments.includes(:author))
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
json.(@project_dataset, :id, :title, :description, :license_id, :paper_content)
|
||||
json.license_name @project_dataset&.license&.name
|
||||
json.attachment_total_count @attachments.total_count
|
||||
json.attachments @attachments do |at|
|
||||
json.partial! "api/v1/attachments/detail", locals: {attachment: at}
|
||||
end
|
Loading…
Reference in New Issue