API: ability to get project by id
This commit is contained in:
parent
92d98f5a0c
commit
1b95c8bff3
2 changed files with 9 additions and 2 deletions
|
@ -5,7 +5,8 @@ module Gitlab
|
|||
end
|
||||
|
||||
def user_project
|
||||
@project ||= current_user.projects.find_by_code(params[:id])
|
||||
@project ||= current_user.projects.find_by_id(params[:id]) ||
|
||||
current_user.projects.find_by_code(params[:id])
|
||||
end
|
||||
|
||||
def authenticate!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue