Merge branch 'pre_trustie_server' into trustie_server

This commit is contained in:
2024-04-15 08:53:06 +08:00
6 changed files with 29 additions and 3 deletions

View 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

View File

@@ -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)

View File

@@ -17,6 +17,7 @@ json.projects @projects do |project|
json.forked_from_project_id project.forked_from_project_id
json.open_devops project.open_devops?
json.platform project.platform
json.has_dataset project.has_menu_permission("dataset") && project.project_dataset.present?
json.author do
if project.educoder?
project_educoder = project.project_educoder