ADD repo_id with get repository api

This commit is contained in:
Jasder 2020-05-20 09:30:56 +08:00
parent 6d39adfa08
commit 339f0b5517
2 changed files with 4 additions and 2 deletions

View File

@ -2,7 +2,7 @@ class RepositoriesController < ApplicationController
include ApplicationHelper
include OperateProjectAbilityAble
before_action :require_login, only: %i[edit update create_file update_file delete_file sync_mirror]
before_action :find_project, :authorizate!, except: :tags
before_action :find_project, :authorizate!, except: [:sync_mirror, :tags]
before_action :find_repository, only: %i[sync_mirror tags]
before_action :authorizate_user_can_edit_project!, only: %i[sync_mirror]

View File

@ -1,6 +1,7 @@
json.identifier @project.identifier
json.name @project.name
json.project_id @project.id
json.repo_id @project.repository.id
json.issues_count @project.issues_count
json.pull_requests_count @project.pull_requests_count
json.project_identifier @project.identifier
@ -18,6 +19,7 @@ json.permission render_edit_project_permission(current_user, @project) if curren
json.mirror_url @project&.repository.mirror_url
json.watched current_user&.watched?(@project)
json.praised current_user&.liked?(@project)
json.status @project.status
json.forked_from_project_id @project_fork_id
json.fork_info do
if @fork_project.present?