discourse/app/assets/javascripts/admin/addon/routes/admin-users-list.js
Alan Guo Xiang Tan 06e0c6fa6a
FIX: Clicking send invites and export button on admin users page (#33121)
The actions are defined on the `AdminUsersIndexRoute` when it should be
the `AdminUsersRoute` as the action is called from the `admin/users`
template.
2025-06-10 08:44:43 +08:00

10 lines
309 B
JavaScript
Vendored

import { action } from "@ember/object";
import DiscourseRoute from "discourse/routes/discourse";
import AdminUser from "admin/models/admin-user";
export default class AdminUsersListRoute extends DiscourseRoute {
@action
deleteUser(user) {
AdminUser.create(user).destroy({ deletePosts: true });
}
}