discourse/app/assets/javascripts/admin/routes/admin-flags-topics-show.js.es6

21 lines
513 B
Plaintext
Raw Normal View History

2017-09-06 10:21:07 -04:00
import { loadTopicView } from 'discourse/models/topic';
export default Ember.Route.extend({
model(params) {
let topicRecord = this.store.createRecord('topic', { id: params.id });
let topic = loadTopicView(topicRecord).then(() => topicRecord);
return Ember.RSVP.hash({
topic,
flaggedPosts: this.store.findAll('flagged-post', {
2017-09-08 16:27:07 -04:00
filter: 'active',
topic_id: params.id
})
2017-09-06 10:21:07 -04:00
});
},
setupController(controller, hash) {
controller.setProperties(hash);
}
});