mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 23:24:10 +08:00
FEATURE: Introduce Ignore user (#7072)
This commit is contained in:

committed by
Régis Hanol

parent
5c476f639c
commit
986cc8a0fb
@ -615,6 +615,20 @@ const User = RestModel.extend({
|
||||
}
|
||||
},
|
||||
|
||||
ignore() {
|
||||
return ajax(`${userPath(this.get("username"))}/ignore.json`, {
|
||||
type: "PUT",
|
||||
data: { ignored_user_id: this.get("id") }
|
||||
});
|
||||
},
|
||||
|
||||
watch() {
|
||||
return ajax(`${userPath(this.get("username"))}/ignore.json`, {
|
||||
type: "DELETE",
|
||||
data: { ignored_user_id: this.get("id") }
|
||||
});
|
||||
},
|
||||
|
||||
dismissBanner(bannerKey) {
|
||||
this.set("dismissed_banner_key", bannerKey);
|
||||
ajax(userPath(this.get("username") + ".json"), {
|
||||
|
Reference in New Issue
Block a user