17 lines
397 B
JavaScript
17 lines
397 B
JavaScript
import Route from "@ember/routing/route";
|
|
import { service } from "@ember/service";
|
|
|
|
export default class SubscriptionsRoute extends Route {
|
|
@service router;
|
|
@service siteSettings;
|
|
|
|
beforeModel() {
|
|
const pricingTableEnabled =
|
|
this.siteSettings.discourse_subscriptions_pricing_table_enabled;
|
|
|
|
if (!pricingTableEnabled) {
|
|
this.router.transitionTo("subscribe");
|
|
}
|
|
}
|
|
}
|