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

21 lines
513 B
Plaintext
Raw Normal View History

2017-09-06 22:21:07 +08: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-09 04:27:07 +08:00
filter: 'active',
topic_id: params.id
})
2017-09-06 22:21:07 +08:00
});
},
setupController(controller, hash) {
controller.setProperties(hash);
}
});