DEV: Remove unused `render()` calls (#19224)

`Route#render` and `Route#renderTemplate` have been deprecated and are removed in Ember 4.x (see: https://deprecations.emberjs.com/v3.x#toc_route-render-template)

The templates of modified routes in this PR are already automatically inserted into `{{outlet}}`s.
This commit is contained in:
Jarek Radosz 2022-11-30 16:49:23 +01:00 committed by GitHub
parent 2ecfdb345f
commit 321b14d40c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 2 additions and 35 deletions

View File

@ -1,10 +1,6 @@
import DiscourseRoute from "discourse/routes/discourse";
export default DiscourseRoute.extend({
renderTemplate() {
this.render("admin/templates/logs/screened-emails", { into: "adminLogs" });
},
setupController() {
return this.controllerFor("adminLogsScreenedEmails").show();
},

View File

@ -1,12 +1,6 @@
import DiscourseRoute from "discourse/routes/discourse";
export default DiscourseRoute.extend({
renderTemplate() {
this.render("admin/templates/logs/screened-ip-addresses", {
into: "adminLogs",
});
},
setupController() {
return this.controllerFor("adminLogsScreenedIpAddresses").show();
},

View File

@ -1,10 +1,6 @@
import DiscourseRoute from "discourse/routes/discourse";
export default DiscourseRoute.extend({
renderTemplate() {
this.render("admin/templates/logs/screened-urls", { into: "adminLogs" });
},
setupController() {
return this.controllerFor("adminLogsScreenedUrls").show();
},

View File

@ -34,13 +34,6 @@ export default DiscourseRoute.extend({
return this._super(value, urlKey, defaultValueType);
},
// TODO: make this automatic using an `{{outlet}}`
renderTemplate() {
this.render("admin/templates/logs/staff-action-logs", {
into: "adminLogs",
});
},
actions: {
onFiltersChange(filters) {
if (filters && Object.keys(filters) === 0) {

View File

@ -14,10 +14,6 @@ export default DiscourseRoute.extend({
return AdminUser.find(get(params, "user_id"));
},
renderTemplate() {
this.render({ into: "admin" });
},
afterModel(adminUser) {
return adminUser.loadDetails().then(function () {
adminUser.setOriginalTrustLevel();

View File

@ -23,8 +23,4 @@ export default DiscourseRoute.extend({
model.set("group_ids", model.get("group_ids"));
controller.setProperties({ model, saved: false });
},
renderTemplate() {
this.render("admin/templates/web-hooks-show", { into: "adminApi" });
},
});

View File

@ -33,7 +33,7 @@ export default function (filter) {
},
renderTemplate() {
this.render("user/posts", { into: "user" });
this.render("user/posts");
},
});
}

View File

@ -17,7 +17,7 @@ export default DiscourseRoute.extend(ViewingActionType, {
},
renderTemplate() {
this.render("user/badges", { into: "user" });
this.render("user/badges");
},
@action

View File

@ -6,10 +6,6 @@ export default DiscourseRoute.extend(ViewingActionType, {
controllerName: "user-notifications",
queryParams: { filter: { refreshModel: true } },
renderTemplate() {
this.render("user/notifications");
},
@action
didTransition() {
this.controllerFor("user-notifications")._showFooter();