FEATURE: Introduce Ignore user (#7072)

This commit is contained in:
Tarek Khalil
2019-02-27 13:49:07 +00:00
committed by Régis Hanol
parent 5c476f639c
commit 986cc8a0fb
16 changed files with 233 additions and 25 deletions

View File

@ -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"), {