Skip to content

Commit

Permalink
Fixes #43 - Don't error when blacklisting blacklisted item
Browse files Browse the repository at this point in the history
  • Loading branch information
lfkeitel committed Mar 29, 2018
1 parent f598a41 commit fc6de6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controllers/api/blacklist.go
Expand Up @@ -50,7 +50,7 @@ func (b *Blacklist) BlacklistUserHandler(w http.ResponseWriter, r *http.Request,
return
}

if r.Method == "POST" {
if r.Method == "POST" && !user.IsBlacklisted() {
user.Blacklist()
} else if r.Method == "DELETE" {
user.Unblacklist()
Expand Down

0 comments on commit fc6de6f

Please sign in to comment.