mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 19:33:02 +03:00
23 lines
607 B
JavaScript
23 lines
607 B
JavaScript
|
import Route from '@ember/routing/route';
|
||
|
import {inject as service} from '@ember/service';
|
||
|
|
||
|
export default Route.extend({
|
||
|
billing: service(),
|
||
|
|
||
|
queryParams: {
|
||
|
action: {refreshModel: true}
|
||
|
},
|
||
|
|
||
|
model(params) {
|
||
|
if (params.action) {
|
||
|
this.billing.set('action', params.action);
|
||
|
}
|
||
|
|
||
|
this.billing.set('billingWindowOpen', true);
|
||
|
|
||
|
// NOTE: if this route is ever triggered it was opened through external link because
|
||
|
// the route has no underlying templates to render we redirect to root route
|
||
|
this.transitionTo('/');
|
||
|
}
|
||
|
});
|