diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-31 21:09:19 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-31 21:09:19 +0300 |
commit | 676109e1b32682bdbdd94a9ffbd8743784f35521 (patch) | |
tree | 71f0394c68455c1736a14c215992de6aa5fe358c /lib/api | |
parent | 5facc34f44ce8736078127a5df174a7b52d922b4 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/invitations.rb | 6 | ||||
-rw-r--r-- | lib/api/system_hooks.rb | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/api/invitations.rb b/lib/api/invitations.rb index 52c32b4d1cf..0d562cc18f8 100644 --- a/lib/api/invitations.rb +++ b/lib/api/invitations.rb @@ -25,11 +25,11 @@ module API optional :expires_at, type: DateTime, desc: 'Date string in the format YEAR-MONTH-DAY' end post ":id/invitations" do - source = find_source(source_type, params[:id]) + params[:source] = find_source(source_type, params[:id]) - authorize_admin_source!(source_type, source) + authorize_admin_source!(source_type, params[:source]) - ::Members::InviteService.new(current_user, params).execute(source) + ::Members::InviteService.new(current_user, params).execute end desc 'Get a list of group or project invitations viewable by the authenticated user' do diff --git a/lib/api/system_hooks.rb b/lib/api/system_hooks.rb index 42e16d47a0b..fe23a111b7f 100644 --- a/lib/api/system_hooks.rb +++ b/lib/api/system_hooks.rb @@ -47,7 +47,7 @@ module API params do requires :id, type: Integer, desc: 'The ID of the system hook' end - get ":id" do + post ":id" do hook = SystemHook.find(params[:id]) data = { event_name: "project_create", |