diff options
-rw-r--r-- | app/controllers/concerns/membership_actions.rb | 2 | ||||
-rw-r--r-- | lib/api/access_requests.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/concerns/membership_actions.rb b/app/controllers/concerns/membership_actions.rb index 1d34441e8ea..52682ef9dc9 100644 --- a/app/controllers/concerns/membership_actions.rb +++ b/app/controllers/concerns/membership_actions.rb @@ -3,7 +3,7 @@ module MembershipActions include MembersHelper def request_access - Members::RequestAccessService.new(membershipable, current_user).execute + membershipable.request_access(current_user) redirect_to polymorphic_path(membershipable), notice: 'Your request for access has been queued for review.' diff --git a/lib/api/access_requests.rb b/lib/api/access_requests.rb index 895847add9e..29a97ccbd75 100644 --- a/lib/api/access_requests.rb +++ b/lib/api/access_requests.rb @@ -33,7 +33,7 @@ module API # POST /projects/:id/access_requests post ":id/access_requests" do source = find_source(source_type, params[:id]) - access_requester = ::Members::RequestAccessService.new(source, current_user).execute + access_requester = source.request_access(current_user) if access_requester.persisted? present access_requester.user, with: Entities::AccessRequester, access_requester: access_requester |