discourse/app/assets/javascripts/admin/addon/routes/admin-email-incomings.js
Robin Ward 195119b77c FIX: Observers weren't working on admin email logs
We were trying to observe a non-ember object which is undefined
behavior and was leaking to odd bugs. This replaces the `filter` object
with an Ember Object and things seem to work.
2020-10-09 16:27:22 -04:00

14 lines
365 B
JavaScript

import DiscourseRoute from "discourse/routes/discourse";
import IncomingEmail from "admin/models/incoming-email";
export default DiscourseRoute.extend({
model() {
return IncomingEmail.findAll({ status: this.status });
},
setupController(controller, model) {
controller.set("model", model);
controller.set("filter.status", this.status);
},
});