diff --git a/assets/javascripts/wizard/components/validator.js.es6 b/assets/javascripts/wizard/components/validator.js.es6 index 2e5c47e7..e272fe52 100644 --- a/assets/javascripts/wizard/components/validator.js.es6 +++ b/assets/javascripts/wizard/components/validator.js.es6 @@ -17,7 +17,7 @@ export default Component.extend({ // set a function that can be called as often as it need to // from the derived component this.backendValidate = (params) => { - return ajax('/realtime_validations', { + return ajax('/realtime-validations', { data: { validation: this.get('name'), authenticity_token: getToken(), diff --git a/config/routes.rb b/config/routes.rb index 3421d55a..110d54c5 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -9,7 +9,7 @@ end Discourse::Application.routes.append do mount ::CustomWizard::Engine, at: 'w' post 'wizard/authorization/callback' => "custom_wizard/authorization#callback" - get 'realtime_validations' => 'custom_wizard/realtime_validations#validate' + get 'realtime-validations' => 'custom_wizard/realtime_validations#validate' scope module: 'custom_wizard', constraints: AdminConstraint.new do get 'admin/wizards' => 'admin#index'