0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-09 20:02:54 +01:00

API: don't present an API menu entry if not subscribed

Dieser Commit ist enthalten in:
merefield 2021-10-04 18:51:47 +01:00
Ursprung c9453a0bdd
Commit a2ebd5c463
2 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -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 siteSettings.wizard_apis_enabled}}
{{#if subscribed}}
{{nav-item route="adminWizardsApi" label="admin.wizard.api.nav_label"}}
{{/if}}
{{nav-item route="adminWizardsLogs" label="admin.wizard.log.nav_label"}}

Datei anzeigen

@ -4,6 +4,7 @@ class CustomWizard::AdminController < ::Admin::AdminController
def index
render_json_dump(
subscribed: CustomWizard::Subscription.subscribed?,
notices: ActiveModel::ArraySerializer.new(
CustomWizard::Notice.list,
each_serializer: CustomWizard::NoticeSerializer