diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2017-11-03 04:40:39 -0500 |
---|---|---|
committer | Eric Eastwood <contact@ericeastwood.com> | 2017-11-03 04:40:39 -0500 |
commit | 880cf60ba2a617ce31800b92e2ac6bb40cffe23a (patch) | |
tree | a5075c2ef17deebcafed05f7ea5c2546c2991dab /app/services | |
parent | 1bbeafc3e1a0e4472a0d8124c9d4711356cde2d0 (diff) | |
parent | f580e49713c611094029424e779f25bd9807c7cf (diff) | |
download | gitlab-ce-880cf60ba2a617ce31800b92e2ac6bb40cffe23a.tar.gz |
Merge branch 'master' into 38464-k8s-apps
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/applications/create_service.rb | 13 | ||||
-rw-r--r-- | app/services/keys/base_service.rb | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/app/services/applications/create_service.rb b/app/services/applications/create_service.rb new file mode 100644 index 00000000000..35d45f25a71 --- /dev/null +++ b/app/services/applications/create_service.rb @@ -0,0 +1,13 @@ +module Applications + class CreateService + def initialize(current_user, params) + @current_user = current_user + @params = params + @ip_address = @params.delete(:ip_address) + end + + def execute(request = nil) + Doorkeeper::Application.create(@params) + end + end +end diff --git a/app/services/keys/base_service.rb b/app/services/keys/base_service.rb index 545832d0bd4..f78791932a7 100644 --- a/app/services/keys/base_service.rb +++ b/app/services/keys/base_service.rb @@ -4,6 +4,7 @@ module Keys def initialize(user, params) @user, @params = user, params + @ip_address = @params.delete(:ip_address) end def notification_service |