添加gitlab API,获取当前user的某个项目id

This commit is contained in:
huang 2017-10-13 19:07:06 +08:00
parent bdb80aba12
commit 818631b573
2 changed files with 11 additions and 1 deletions

View File

@ -91,7 +91,13 @@ class GamesController < ApplicationController
# git_repository_url @myshixun, "Myshixun"
# @st 0 实践任务 1 选择题任务
def show
# 展示全部实训
# g = Gitlab.client
# g_name = g.project(@myshixun.gpid).try(:name)
# if g_name.include?("-")
# g.delete_project()
# end
# 展示全部实训
# git_myshixun_url_ip @myshixun, user_id
@is_subject = params[:is_subject]
if @game.status == 1
# 放置页面ajax数据还没获取就关闭

View File

@ -19,6 +19,10 @@ class Gitlab::Client
end
end
def current_user_project(user_id, project_name)
get("/projects/current_user_projects?user_id=#{user_id}&project_name=#{project_name}")
end
# Gets information about a project.
#
# @example