Editors can now lock threads

This commit is contained in:
2018-04-25 18:59:23 +02:00
parent 7d70f3b0b5
commit 3ebd4b0856
11 changed files with 75 additions and 36 deletions

View File

@ -2,7 +2,7 @@ import AnimeNotifier from "../AnimeNotifier"
// Follow user
export function followUser(arn: AnimeNotifier, elem: HTMLElement) {
return arn.post(elem.dataset.api, "")
return arn.post(elem.dataset.api)
.then(() => arn.reloadContent())
.then(() => arn.statusMessage.showInfo("You are now following " + document.getElementById("nick").innerText + "."))
.catch(err => arn.statusMessage.showError(err))
@ -10,7 +10,7 @@ export function followUser(arn: AnimeNotifier, elem: HTMLElement) {
// Unfollow user
export function unfollowUser(arn: AnimeNotifier, elem: HTMLElement) {
return arn.post(elem.dataset.api, "")
return arn.post(elem.dataset.api)
.then(() => arn.reloadContent())
.then(() => arn.statusMessage.showInfo("You stopped following " + document.getElementById("nick").innerText + "."))
.catch(err => arn.statusMessage.showError(err))