diff options
Diffstat (limited to 'app/services/badges/create_service.rb')
-rw-r--r-- | app/services/badges/create_service.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/services/badges/create_service.rb b/app/services/badges/create_service.rb new file mode 100644 index 00000000000..aafb87f7dcd --- /dev/null +++ b/app/services/badges/create_service.rb @@ -0,0 +1,10 @@ +module Badges + class CreateService < Badges::BaseService + # returns the created badge + def execute(source) + badge = Badges::BuildService.new(params).execute(source) + + badge.tap { |b| b.save } + end + end +end |