Explorar o código

Add add_wizard helper

Angus McLeod %!s(int64=7) %!d(string=hai) anos
pai
achega
a784d4a33e
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      lib/wizard.rb

+ 5 - 0
lib/wizard.rb

@@ -136,4 +136,9 @@ class CustomWizard::Wizard
       []
     end
   end
+
+  def self.add_wizard(json)
+    wizard = ::JSON.parse(json)
+    PluginStore.set('custom_wizard', wizard["id"], wizard)
+  end
 end