Reduce amount of user info provided with internal api
This commit is contained in:
parent
a29c883b5b
commit
11b57d979c
2 changed files with 5 additions and 1 deletions
|
@ -5,6 +5,10 @@ module Gitlab
|
||||||
:dark_scheme, :theme_id, :state, :created_at, :extern_uid, :provider
|
:dark_scheme, :theme_id, :state, :created_at, :extern_uid, :provider
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class UserSafe < Grape::Entity
|
||||||
|
expose :name
|
||||||
|
end
|
||||||
|
|
||||||
class UserBasic < Grape::Entity
|
class UserBasic < Grape::Entity
|
||||||
expose :id, :username, :email, :name, :state, :created_at
|
expose :id, :username, :email, :name, :state, :created_at
|
||||||
end
|
end
|
||||||
|
|
|
@ -44,7 +44,7 @@ module Gitlab
|
||||||
#
|
#
|
||||||
get "/discover" do
|
get "/discover" do
|
||||||
key = Key.find(params[:key_id])
|
key = Key.find(params[:key_id])
|
||||||
present key.user, with: Entities::User
|
present key.user, with: Entities::UserSafe
|
||||||
end
|
end
|
||||||
|
|
||||||
get "/check" do
|
get "/check" do
|
||||||
|
|
Loading…
Reference in a new issue