diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-06-06 21:42:45 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-06-06 21:42:45 +0800 |
commit | d919f924bf32220237c389dc913093efead8928c (patch) | |
tree | beb756b9eecc2b3eaa78a4fd302bb50aa0cc2d7f /lib/api | |
parent | 34f925fe0bebdc7212c1c960678114a4e44828ef (diff) | |
download | gitlab-ce-d919f924bf32220237c389dc913093efead8928c.tar.gz |
Backport https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1942
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/groups.rb | 4 | ||||
-rw-r--r-- | lib/api/users.rb | 4 |
2 files changed, 1 insertions, 7 deletions
diff --git a/lib/api/groups.rb b/lib/api/groups.rb index e14a988a153..ebbaed0cbb7 100644 --- a/lib/api/groups.rb +++ b/lib/api/groups.rb @@ -83,7 +83,7 @@ module API group = ::Groups::CreateService.new(current_user, declared_params(include_missing: false)).execute if group.persisted? - present group, with: Entities::Group, current_user: current_user + present group, with: Entities::GroupDetail, current_user: current_user else render_api_error!("Failed to save group #{group.errors.messages}", 400) end @@ -101,8 +101,6 @@ module API optional :name, type: String, desc: 'The name of the group' optional :path, type: String, desc: 'The path of the group' use :optional_params - at_least_one_of :name, :path, :description, :visibility, - :lfs_enabled, :request_access_enabled end put ':id' do group = find_group!(params[:id]) diff --git a/lib/api/users.rb b/lib/api/users.rb index e8694e90cf2..7d78c5a55a9 100644 --- a/lib/api/users.rb +++ b/lib/api/users.rb @@ -124,10 +124,6 @@ module API optional :name, type: String, desc: 'The name of the user' optional :username, type: String, desc: 'The username of the user' use :optional_attributes - at_least_one_of :email, :password, :name, :username, :skype, :linkedin, - :twitter, :website_url, :organization, :projects_limit, - :extern_uid, :provider, :bio, :location, :admin, - :can_create_group, :confirm, :external end put ":id" do authenticated_as_admin! |