2021-03-11 07:30:15 +01:00
|
|
|
# frozen_string_literal: true
|
2019-12-05 07:48:32 +01:00
|
|
|
CustomWizard::Engine.routes.draw do
|
2022-07-27 15:40:05 +02:00
|
|
|
get ':wizard_id' => 'wizard#show'
|
2019-12-05 07:48:32 +01:00
|
|
|
put ':wizard_id/skip' => 'wizard#skip'
|
2022-07-27 15:40:05 +02:00
|
|
|
get ':wizard_id/steps' => 'wizard#show'
|
|
|
|
get ':wizard_id/steps/:step_id' => 'wizard#show'
|
2019-12-05 07:48:32 +01:00
|
|
|
put ':wizard_id/steps/:step_id' => 'steps#update'
|
|
|
|
end
|
|
|
|
|
|
|
|
Discourse::Application.routes.append do
|
|
|
|
mount ::CustomWizard::Engine, at: 'w'
|
|
|
|
post 'wizard/authorization/callback' => "custom_wizard/authorization#callback"
|
2021-02-11 14:54:32 +01:00
|
|
|
get 'realtime-validations' => 'custom_wizard/realtime_validations#validate'
|
2019-12-05 07:48:32 +01:00
|
|
|
|
|
|
|
scope module: 'custom_wizard', constraints: AdminConstraint.new do
|
|
|
|
get 'admin/wizards' => 'admin#index'
|
2023-09-24 09:25:42 +02:00
|
|
|
get 'admin/wizards/subscription' => 'subscription#index'
|
2021-03-11 07:30:15 +01:00
|
|
|
|
2020-04-13 14:17:22 +02:00
|
|
|
get 'admin/wizards/wizard' => 'admin_wizard#index'
|
|
|
|
get 'admin/wizards/wizard/create' => 'admin#index'
|
|
|
|
get 'admin/wizards/wizard/:wizard_id' => 'admin_wizard#show'
|
|
|
|
put 'admin/wizards/wizard/:wizard_id' => 'admin_wizard#save'
|
|
|
|
delete 'admin/wizards/wizard/:wizard_id' => 'admin_wizard#remove'
|
2021-03-11 07:30:15 +01:00
|
|
|
|
2020-10-20 07:40:23 +02:00
|
|
|
get 'admin/wizards/custom-fields' => 'admin_custom_fields#index'
|
|
|
|
put 'admin/wizards/custom-fields' => 'admin_custom_fields#update'
|
2020-11-09 11:44:32 +01:00
|
|
|
delete 'admin/wizards/custom-fields/:name' => 'admin_custom_fields#destroy'
|
2021-03-11 07:30:15 +01:00
|
|
|
|
2020-04-13 14:17:22 +02:00
|
|
|
get 'admin/wizards/submissions' => 'admin_submissions#index'
|
|
|
|
get 'admin/wizards/submissions/:wizard_id' => 'admin_submissions#show'
|
|
|
|
get 'admin/wizards/submissions/:wizard_id/download' => 'admin_submissions#download'
|
2021-03-11 07:30:15 +01:00
|
|
|
|
2020-04-15 06:29:47 +02:00
|
|
|
get 'admin/wizards/api' => 'admin_api#list'
|
|
|
|
get 'admin/wizards/api/:name' => 'admin_api#find'
|
|
|
|
put 'admin/wizards/api/:name' => 'admin_api#save'
|
|
|
|
delete 'admin/wizards/api/:name' => 'admin_api#remove'
|
2020-04-22 15:03:18 +02:00
|
|
|
delete 'admin/wizards/api/:name/logs' => 'admin_api#clearlogs'
|
2020-04-15 06:29:47 +02:00
|
|
|
get 'admin/wizards/api/:name/redirect' => 'admin_api#redirect'
|
|
|
|
get 'admin/wizards/api/:name/authorize' => 'admin_api#authorize'
|
2021-03-11 07:30:15 +01:00
|
|
|
|
2020-04-15 02:46:44 +02:00
|
|
|
get 'admin/wizards/logs' => 'admin_logs#index'
|
2021-09-09 08:07:12 +02:00
|
|
|
get 'admin/wizards/logs/:wizard_id' => 'admin_logs#show'
|
2021-03-11 07:30:15 +01:00
|
|
|
|
2020-11-09 04:32:36 +01:00
|
|
|
get 'admin/wizards/manager' => 'admin_manager#index'
|
|
|
|
get 'admin/wizards/manager/export' => 'admin_manager#export'
|
|
|
|
post 'admin/wizards/manager/import' => 'admin_manager#import'
|
|
|
|
delete 'admin/wizards/manager/destroy' => 'admin_manager#destroy'
|
2019-12-05 07:48:32 +01:00
|
|
|
end
|
2021-03-11 07:30:15 +01:00
|
|
|
end
|