FIX: Restore user summary's delete button behavior. (#11844)
The user summary's delete button UX relied on the "admin-user.js" destroy function, which was called through the "admin-tools" service. After #11724, we no longer put UX behavior on Ember models.
This commit is contained in:
@@ -264,7 +264,17 @@ const AdminUser = User.extend({
|
||||
return ajax(`/admin/users/${this.id}.json`, {
|
||||
type: "DELETE",
|
||||
data: formData,
|
||||
});
|
||||
})
|
||||
.then((data) => {
|
||||
if (!data.deleted && data.user) {
|
||||
this.setProperties(data.user);
|
||||
}
|
||||
|
||||
return data;
|
||||
})
|
||||
.catch(() => {
|
||||
this.find(this.id).then((u) => this.setProperties(u));
|
||||
});
|
||||
},
|
||||
|
||||
merge(formData) {
|
||||
|
||||
Reference in New Issue
Block a user