aboutsummaryrefslogtreecommitdiff
path: root/web/discordwebhook
diff options
context:
space:
mode:
authorChristine Dodrill <me@christine.website>2019-02-02 06:53:12 -0800
committerChristine Dodrill <me@christine.website>2019-02-02 06:53:12 -0800
commit7bcfbc6a4da40f498af83e40c3c57ef02ec212cf (patch)
treeee224b7b08722e06d78f49bc557249891264e38f /web/discordwebhook
parentda3595468056f1dd04d79c908f8a65dc0c5a397f (diff)
downloadx-7bcfbc6a4da40f498af83e40c3c57ef02ec212cf.tar.xz
x-7bcfbc6a4da40f498af83e40c3c57ef02ec212cf.zip
web: use error type, simplify some code
Diffstat (limited to 'web/discordwebhook')
-rw-r--r--web/discordwebhook/webhook.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/discordwebhook/webhook.go b/web/discordwebhook/webhook.go
index 6cbe6d1..91df381 100644
--- a/web/discordwebhook/webhook.go
+++ b/web/discordwebhook/webhook.go
@@ -59,7 +59,7 @@ func Send(whurl string, w Webhook) *http.Request {
// Validate validates the response from Discord.
func Validate(resp *http.Response) error {
- if resp.StatusCode/100 != 2 {
+ if resp.StatusCode != http.StatusOK {
return web.NewError(http.StatusOK, resp)
}