mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
新增:根据项目id查询数据集接口
This commit is contained in:
14
app/views/api/v1/project_datasets/index.json.jbuilder
Normal file
14
app/views/api/v1/project_datasets/index.json.jbuilder
Normal file
@@ -0,0 +1,14 @@
|
||||
json.total_count @project_datasets.total_count
|
||||
json.project_datasets @project_datasets.each do |dataset|
|
||||
json.(dataset, :id, :title, :description, :paper_content)
|
||||
json.project do
|
||||
json.partial! "api/v1/projects/simple_detail", project: dataset.project
|
||||
end
|
||||
if dataset.license.present?
|
||||
json.license do
|
||||
json.(dataset.license, :name, :content)
|
||||
end
|
||||
else
|
||||
json.license nil
|
||||
end
|
||||
end
|
||||
@@ -1,7 +1,7 @@
|
||||
if project.present?
|
||||
json.type project.project_type
|
||||
json.(project,
|
||||
:description, :forked_count, :forked_from_project_id, :identifier,
|
||||
:id, :description, :forked_count, :forked_from_project_id, :identifier,
|
||||
:issues_count, :pull_requests_count, :invite_code, :website, :platform,
|
||||
:name, :open_devops, :praises_count, :is_public, :status, :watchers_count,
|
||||
:ignore_id, :license_id, :project_category_id, :project_language_id)
|
||||
|
||||
Reference in New Issue
Block a user