mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: checkUsername, delete and dismissBanner not working with users with .
This commit is contained in:
parent
38b8d68c68
commit
90351348ec
@ -462,7 +462,7 @@ const User = RestModel.extend({
|
|||||||
|
|
||||||
"delete": function() {
|
"delete": function() {
|
||||||
if (this.get('can_delete_account')) {
|
if (this.get('can_delete_account')) {
|
||||||
return ajax(userPath(this.get('username')), {
|
return ajax(userPath(this.get('username') + ".json"), {
|
||||||
type: 'DELETE',
|
type: 'DELETE',
|
||||||
data: {context: window.location.pathname}
|
data: {context: window.location.pathname}
|
||||||
});
|
});
|
||||||
@ -473,7 +473,7 @@ const User = RestModel.extend({
|
|||||||
|
|
||||||
dismissBanner(bannerKey) {
|
dismissBanner(bannerKey) {
|
||||||
this.set("dismissed_banner_key", bannerKey);
|
this.set("dismissed_banner_key", bannerKey);
|
||||||
ajax(userPath(this.get('username')), {
|
ajax(userPath(this.get('username') + ".json"), {
|
||||||
type: 'PUT',
|
type: 'PUT',
|
||||||
data: { dismissed_banner_key: bannerKey }
|
data: { dismissed_banner_key: bannerKey }
|
||||||
});
|
});
|
||||||
@ -552,7 +552,7 @@ User.reopenClass(Singleton, {
|
|||||||
},
|
},
|
||||||
|
|
||||||
checkUsername(username, email, for_user_id) {
|
checkUsername(username, email, for_user_id) {
|
||||||
return ajax(userPath('check_username'), {
|
return ajax(userPath('check_username') + ".json", {
|
||||||
data: { username, email, for_user_id }
|
data: { username, email, for_user_id }
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user