This commit is contained in:
parent
a05ef8d107
commit
626fa8a7b3
|
@ -324,7 +324,7 @@ class ProjectsController < ApplicationController
|
|||
# 如果该项目有所属的项目分类以及为私有项目,需要更新对应数量
|
||||
@project.project_category.decrement!(:private_projects_count, 1) if @project.project_category.present? && !@project.is_public
|
||||
tip_exception("导入失败,请重试!")
|
||||
end
|
||||
else
|
||||
# 为了缓存活跃项目的基本信息,后续删除
|
||||
Cache::V2::ProjectCommonService.new(@project.id).read
|
||||
# 项目名称,标识,所有者变化时重置缓存
|
||||
|
@ -336,6 +336,7 @@ class ProjectsController < ApplicationController
|
|||
end
|
||||
json_response(@project, current_user)
|
||||
end
|
||||
end
|
||||
|
||||
def recommend
|
||||
@projects = Project.recommend.includes(:repository, :project_category, :owner).order(visits: :desc)
|
||||
|
|
Loading…
Reference in New Issue