mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 20:34:02 +03:00
22 lines
558 B
JavaScript
22 lines
558 B
JavaScript
import Controller from '@ember/controller';
|
|
import {A} from '@ember/array';
|
|
import {inject as service} from '@ember/service';
|
|
import {task} from 'ember-concurrency';
|
|
import {tracked} from '@glimmer/tracking';
|
|
|
|
export default class MentionsController extends Controller {
|
|
@service store;
|
|
|
|
@tracked mentionsList = A([]);
|
|
|
|
constructor() {
|
|
super(...arguments);
|
|
}
|
|
|
|
@task
|
|
*loadMentionsTask() {
|
|
const mentions = yield this.store.query('mention', {order: 'created_at desc'});
|
|
this.mentionsList = mentions;
|
|
}
|
|
}
|