Farmbot-Web-App/app/mutations/steps/create.rb

16 lines
288 B
Ruby
Raw Normal View History

module Steps
class Create < Mutations::Command
using MongoidRefinements
required do
string :message_type, in: Step::MESSAGE_TYPES
2015-01-11 07:47:35 -07:00
hash(:command) { model :*, class: Object }
2015-01-08 06:08:54 -07:00
model :sequence
end
2015-01-11 07:47:35 -07:00
def execute
create(Step, inputs)
end
end
end