asciinema.org/app/services/asciicast_creator.rb

12 lines
267 B
Ruby
Raw Normal View History

class AsciicastCreator
def create(attributes, headers)
attributes = AsciicastParams.new(attributes, headers).to_h
asciicast = Asciicast.create!(attributes, without_protection: true)
AsciicastWorker.perform_async(asciicast.id)
asciicast
end
end