2019-10-22 08:46:10 -05:00
|
|
|
import DiscourseRoute from "discourse/routes/discourse";
|
2020-12-01 15:31:26 -03:00
|
|
|
import { get } from "@ember/object";
|
2019-10-22 08:46:10 -05:00
|
|
|
|
|
|
|
export default DiscourseRoute.extend({
|
2016-06-15 19:49:57 +02:00
|
|
|
model(params) {
|
2019-11-01 13:57:22 -04:00
|
|
|
return this.store.findAll("web-hook-event", get(params, "web_hook_id"));
|
2016-06-15 19:49:57 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
setupController(controller, model) {
|
2018-06-15 17:03:24 +02:00
|
|
|
controller.set("model", model);
|
2016-09-14 07:54:53 +08:00
|
|
|
controller.subscribe();
|
|
|
|
},
|
|
|
|
|
|
|
|
deactivate() {
|
2018-06-15 17:03:24 +02:00
|
|
|
this.controllerFor("adminWebHooks.showEvents").unsubscribe();
|
2016-06-15 19:49:57 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
renderTemplate() {
|
2018-06-15 17:03:24 +02:00
|
|
|
this.render("admin/templates/web-hooks-show-events", { into: "adminApi" });
|
2020-09-04 13:42:47 +02:00
|
|
|
},
|
2016-06-15 19:49:57 +02:00
|
|
|
});
|