discourse-subscriptions/assets/javascripts/discourse/routes/subscribe.js

17 lines
396 B
JavaScript
Raw Normal View History

2019-12-12 19:54:32 -05:00
import Route from "@ember/routing/route";
import { service } from "@ember/service";
export default class SubscribeRoute extends Route {
@service router;
@service siteSettings;
beforeModel() {
const pricingTableEnabled =
this.siteSettings.discourse_subscriptions_pricing_table_enabled;
if (pricingTableEnabled) {
this.router.transitionTo("subscriptions");
}
}
}