新增: 项目详情

This commit is contained in:
2022-06-22 19:08:14 +08:00
parent aefd6c08dc
commit d7dd3901b8
11 changed files with 125 additions and 10 deletions

View File

@@ -0,0 +1,20 @@
module Api::ProjectHelper
extend ActiveSupport::Concern
def load_project
namespace = params[:owner]
repo = params[:repo]
@project, @owner = Project.find_with_namespace(namespace, repo)
if @project
logger.info "###########project not founded"
@project
else
logger.info "###########project not found"
@project = nil
render_not_found and return
end
@project
end
end