diff options
| author | Christine Dodrill <me@christine.website> | 2019-02-02 06:53:12 -0800 |
|---|---|---|
| committer | Christine Dodrill <me@christine.website> | 2019-02-02 06:53:12 -0800 |
| commit | 7bcfbc6a4da40f498af83e40c3c57ef02ec212cf (patch) | |
| tree | ee224b7b08722e06d78f49bc557249891264e38f /web/discordwebhook | |
| parent | da3595468056f1dd04d79c908f8a65dc0c5a397f (diff) | |
| download | x-7bcfbc6a4da40f498af83e40c3c57ef02ec212cf.tar.xz x-7bcfbc6a4da40f498af83e40c3c57ef02ec212cf.zip | |
web: use error type, simplify some code
Diffstat (limited to 'web/discordwebhook')
| -rw-r--r-- | web/discordwebhook/webhook.go | 2 |
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) } |
