Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-09 20:02:54 +01:00
API: only show API menu on business sub
Dieser Commit ist enthalten in:
Ursprung
31e275668c
Commit
1f939c1ca0
3 geänderte Dateien mit 3 neuen und 5 gelöschten Zeilen
|
@ -2,7 +2,7 @@
|
|||
{{nav-item route="adminWizardsWizard" label="admin.wizard.nav_label"}}
|
||||
{{nav-item route="adminWizardsCustomFields" label="admin.wizard.custom_field.nav_label"}}
|
||||
{{nav-item route="adminWizardsSubmissions" label="admin.wizard.submissions.nav_label"}}
|
||||
{{#if subscribed}}
|
||||
{{#if api_subscription}}
|
||||
{{nav-item route="adminWizardsApi" label="admin.wizard.api.nav_label"}}
|
||||
{{/if}}
|
||||
{{nav-item route="adminWizardsLogs" label="admin.wizard.log.nav_label"}}
|
||||
|
|
|
@ -15,6 +15,3 @@ plugins:
|
|||
refresh: true
|
||||
type: list
|
||||
list_type: compact
|
||||
wizard_apis_enabled:
|
||||
client: true
|
||||
default: false
|
|
@ -4,7 +4,8 @@ class CustomWizard::AdminController < ::Admin::AdminController
|
|||
|
||||
def index
|
||||
render_json_dump(
|
||||
subscribed: CustomWizard::Subscription.subscribed?,
|
||||
#TODO replace with appropriate static?
|
||||
api_subscription: ["business"].includes?(CustomWizard::Subscription.type),
|
||||
notices: ActiveModel::ArraySerializer.new(
|
||||
CustomWizard::Notice.list,
|
||||
each_serializer: CustomWizard::NoticeSerializer
|
||||
|
|
Laden …
In neuem Issue referenzieren