gitlab-org--gitlab-foss/app/services/notes/create_service.rb
Douglas Barbosa Alexandre 3d52e139b1 Rename Tasks to Todos
2016-02-20 12:39:27 -02:00

18 lines
389 B
Ruby

module Notes
class CreateService < BaseService
def execute
note = project.notes.new(params)
note.author = current_user
note.system = false
if note.save
# Finish the harder work in the background
NewNoteWorker.perform_in(2.seconds, note.id, params)
TodoService.new.new_note(note, current_user)
end
note
end
end
end