mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-20 21:25:23 +08:00
The actions are defined on the `AdminUsersIndexRoute` when it should be the `AdminUsersRoute` as the action is called from the `admin/users` template.
26 lines
723 B
JavaScript
Vendored
26 lines
723 B
JavaScript
Vendored
import { action } from "@ember/object";
|
|
import { service } from "@ember/service";
|
|
import { exportEntity } from "discourse/lib/export-csv";
|
|
import { outputExportResult } from "discourse/lib/export-result";
|
|
import DiscourseRoute from "discourse/routes/discourse";
|
|
import { i18n } from "discourse-i18n";
|
|
|
|
export default class AdminUsersRoute extends DiscourseRoute {
|
|
@service router;
|
|
|
|
titleToken() {
|
|
return i18n("admin.config.users.title");
|
|
}
|
|
|
|
@action
|
|
exportUsers() {
|
|
exportEntity("user_list", {
|
|
trust_level: this.controllerFor("admin-users-list-show").get("query"),
|
|
}).then(outputExportResult);
|
|
}
|
|
|
|
@action
|
|
sendInvites() {
|
|
this.router.transitionTo("userInvited", this.currentUser);
|
|
}
|
|
}
|