Fixed else syntax

This commit is contained in:
Ahmet Akkoç 2021-11-08 10:21:28 +01:00 committed by GitHub
parent d815f6d8d9
commit 28f2333770
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,8 +97,7 @@ func (c *Client) VerifyWebhookSignature(ctx context.Context, httpReq *http.Reque
var bodyBytes []byte
if httpReq.Body != nil {
bodyBytes, _ = ioutil.ReadAll(httpReq.Body)
}
else{
}else{
return nil, errors.New("Cannot verify webhook for HTTP Request with empty body.")
}
// Restore the io.ReadCloser to its original state