mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Refactor: Instead of getting currentUser from the Discourse namespace, use
`Discourse.User.current()`
This commit is contained in:
@@ -54,7 +54,7 @@ Discourse.AdminUser = Discourse.User.extend({
|
||||
approve: function() {
|
||||
this.set('can_approve', false);
|
||||
this.set('approved', true);
|
||||
this.set('approved_by', Discourse.get('currentUser'));
|
||||
this.set('approved_by', Discourse.User.current());
|
||||
Discourse.ajax("/admin/users/" + (this.get('id')) + "/approve", {type: 'PUT'});
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user