mirror of
https://github.com/discourse/discourse-subscriptions.git
synced 2025-03-02 23:59:09 +00:00
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");
|
||
|
}
|
||
|
}
|
||
|
}
|