mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 19:29:34 +08:00
DEV: attemps to limit Discourse.User.current() usage (#7943)
This commit is contained in:
@ -227,14 +227,14 @@ const AdminUser = Discourse.User.extend({
|
||||
.catch(popupAjaxError);
|
||||
},
|
||||
|
||||
approve() {
|
||||
approve(approvedBy) {
|
||||
return ajax(`/admin/users/${this.id}/approve`, {
|
||||
type: "PUT"
|
||||
}).then(() => {
|
||||
this.setProperties({
|
||||
can_approve: false,
|
||||
approved: true,
|
||||
approved_by: Discourse.User.current()
|
||||
approved_by: approvedBy
|
||||
});
|
||||
});
|
||||
},
|
||||
|
Reference in New Issue
Block a user