fix: Potential nil pointer dereference

This commit is contained in:
Manuel 2024-04-27 22:20:03 +02:00
parent 8f13f765a1
commit 7562b86894
Signed by: SunRed
GPG Key ID: 4085037435E1F07A
1 changed files with 1 additions and 1 deletions

View File

@ -96,10 +96,10 @@ func sendRequest(url string, data *Webhook) error {
}
resp, err := http.Post(url, "application/json", bytes.NewBuffer(jsonData))
defer resp.Body.Close()
if err != nil {
return err
}
defer resp.Body.Close()
return nil
}