mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 18:31:57 +03:00
57bc14e00f
ref https://github.com/TryGhost/Team/issues/2421 - added the Mentions API endpoint to Admin - setup initial mention model in the Ember Store to be able to dev with the endpoint - added basic routing to access the `/mentions` page that is currently behind feature flags - Setup basic testing with a mirage mock endpoint.
20 lines
529 B
JavaScript
20 lines
529 B
JavaScript
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
|
import {inject as service} from '@ember/service';
|
|
|
|
export default class MentionsRoute extends AuthenticatedRoute {
|
|
@service store;
|
|
@service feature;
|
|
|
|
beforeModel() {
|
|
super.beforeModel(...arguments);
|
|
if (!this.feature.webmentions) {
|
|
return this.transitionTo('dashboard');
|
|
}
|
|
}
|
|
|
|
setupController(controller) {
|
|
super.setupController(...arguments);
|
|
controller.loadMentionsTask.perform();
|
|
}
|
|
}
|