From cfb65245ea378f7600cb03df238e4ed15906366d Mon Sep 17 00:00:00 2001 From: Faizaan Gagan Date: Thu, 11 Feb 2021 19:24:32 +0530 Subject: [PATCH] renamed endpoint to realtime-validations --- assets/javascripts/wizard/components/validator.js.es6 | 2 +- config/routes.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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'