mirror of
https://github.com/discourse/discourse.git
synced 2025-02-09 04:44:59 +00: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() {
|
||||
if (this.get('can_delete_account')) {
|
||||
return ajax(userPath(this.get('username')), {
|
||||
return ajax(userPath(this.get('username') + ".json"), {
|
||||
type: 'DELETE',
|
||||
data: {context: window.location.pathname}
|
||||
});
|
||||
@ -473,7 +473,7 @@ const User = RestModel.extend({
|
||||
|
||||
dismissBanner(bannerKey) {
|
||||
this.set("dismissed_banner_key", bannerKey);
|
||||
ajax(userPath(this.get('username')), {
|
||||
ajax(userPath(this.get('username') + ".json"), {
|
||||
type: 'PUT',
|
||||
data: { dismissed_banner_key: bannerKey }
|
||||
});
|
||||
@ -552,7 +552,7 @@ User.reopenClass(Singleton, {
|
||||
},
|
||||
|
||||
checkUsername(username, email, for_user_id) {
|
||||
return ajax(userPath('check_username'), {
|
||||
return ajax(userPath('check_username') + ".json", {
|
||||
data: { username, email, for_user_id }
|
||||
});
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user