2018-10-04 14:16:41 +03:00
|
|
|
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
|
|
|
import CurrentUserSettings from '../../../mixins/current-user-settings';
|
2018-01-09 13:36:41 +03:00
|
|
|
|
2018-10-04 14:16:41 +03:00
|
|
|
export default AuthenticatedRoute.extend(CurrentUserSettings, {
|
|
|
|
beforeModel() {
|
|
|
|
this._super(...arguments);
|
|
|
|
return this.get('session.user')
|
|
|
|
.then(this.transitionAuthor())
|
|
|
|
.then(this.transitionEditor());
|
2019-04-04 14:25:16 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
model(params, transition) {
|
|
|
|
// use the integrations controller to fetch all integrations and pick
|
|
|
|
// out the one we want. Allows navigation back to integrations screen
|
|
|
|
// without a loading state
|
|
|
|
return this
|
|
|
|
.controllerFor('settings.integrations')
|
|
|
|
.integrationModelHook('slug', 'zapier', this, transition);
|
2019-05-20 18:16:19 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
buildRouteInfoMetadata() {
|
|
|
|
return {
|
|
|
|
titleToken: 'Zapier'
|
|
|
|
};
|
2018-10-04 14:16:41 +03:00
|
|
|
}
|
2018-01-09 13:36:41 +03:00
|
|
|
});
|