mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Convert server side paths to use /u/
This commit is contained in:
@@ -5,6 +5,7 @@ import { popupAjaxError } from 'discourse/lib/ajax-error';
|
||||
import ApiKey from 'admin/models/api-key';
|
||||
import Group from 'discourse/models/group';
|
||||
import TL3Requirements from 'admin/models/tl3-requirements';
|
||||
import { userPath } from 'discourse/lib/url';
|
||||
|
||||
const AdminUser = Discourse.User.extend({
|
||||
|
||||
@@ -346,7 +347,7 @@ const AdminUser = Discourse.User.extend({
|
||||
},
|
||||
|
||||
sendActivationEmail() {
|
||||
return ajax('/users/action/send_activation_email', {
|
||||
return ajax(userPath('action/send_activation_email'), {
|
||||
type: 'POST',
|
||||
data: { username: this.get('username') }
|
||||
}).then(function() {
|
||||
|
||||
@@ -83,14 +83,14 @@ export default Discourse.Route.extend({
|
||||
activate() {
|
||||
this._super();
|
||||
const user = this.modelFor('user');
|
||||
this.messageBus.subscribe("/users/" + user.get('username_lower'), function(data) {
|
||||
this.messageBus.subscribe("/u/" + user.get('username_lower'), function(data) {
|
||||
user.loadUserAction(data);
|
||||
});
|
||||
},
|
||||
|
||||
deactivate() {
|
||||
this._super();
|
||||
this.messageBus.unsubscribe("/users/" + this.modelFor('user').get('username_lower'));
|
||||
this.messageBus.unsubscribe("/u/" + this.modelFor('user').get('username_lower'));
|
||||
|
||||
// Remove the search context
|
||||
this.searchService.set('searchContext', null);
|
||||
|
||||
Reference in New Issue
Block a user