show only current user projects
This commit is contained in:
parent
7b5c3cc8be
commit
84a3f8fca4
2 changed files with 4 additions and 5 deletions
|
@ -41,19 +41,19 @@ module Gitlab
|
|||
|
||||
# GET /projects/:id
|
||||
get ":id" do
|
||||
@project = Project.find_by_code(params[:id])
|
||||
@project = current_user.projects.find_by_code(params[:id])
|
||||
present @project, :with => Entities::Project
|
||||
end
|
||||
|
||||
# GET /projects/:id/repository/branches
|
||||
get ":id/repository/branches" do
|
||||
@project = Project.find_by_code(params[:id])
|
||||
@project = current_user.projects.find_by_code(params[:id])
|
||||
present @project.repo.heads.sort_by(&:name), :with => Entities::ProjectRepositoryBranches
|
||||
end
|
||||
|
||||
# GET /projects/:id/repository/tags
|
||||
get ":id/repository/tags" do
|
||||
@project = Project.find_by_code(params[:id])
|
||||
@project = current_user.projects.find_by_code(params[:id])
|
||||
present @project.repo.tags.sort_by(&:name).reverse, :with => Entities::ProjectRepositoryTags
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue