Convert front end paths from /users/ to /u/

This commit is contained in:
Robin Ward
2017-03-28 12:16:58 -04:00
parent 6b976433c9
commit 45a257815a
40 changed files with 129 additions and 84 deletions

View File

@ -1,6 +1,7 @@
import { ajax } from 'discourse/lib/ajax';
import CanCheckEmails from 'discourse/mixins/can-check-emails';
import { propertyNotEqual, setting } from 'discourse/lib/computed';
import { userPath } from 'discourse/lib/url';
export default Ember.Controller.extend(CanCheckEmails, {
editingTitle: false,
@ -62,7 +63,7 @@ export default Ember.Controller.extend(CanCheckEmails, {
saveTitle() {
const self = this;
return ajax(`/users/${this.get('model.username').toLowerCase()}.json`, {
return ajax(userPath(`${this.get('model.username').toLowerCase()}.json`), {
data: {title: this.get('userTitleValue')},
type: 'PUT'
}).catch(function(e) {