Skip to content

Commit 3213185

Browse files
committed
Fixing return bug
1 parent 4f2bddc commit 3213185

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

invoice.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ func DownloadInvoicePDF(config DownloadInvoice) ([]byte, error) {
630630
// New http request
631631
request, err := http.NewRequest("GET", fmt.Sprintf("https://my.sevdesk.de/api/v1/Invoice/%s/getPdf?preventSendBy=%s&download=%s", config.ID, config.PreventSendBy, config.Download), nil)
632632
if err != nil {
633-
return "", err
633+
return nil, err
634634
}
635635

636636
// Set header
@@ -640,7 +640,7 @@ func DownloadInvoicePDF(config DownloadInvoice) ([]byte, error) {
640640
// Response to sevDesk
641641
response, err := client.Do(request)
642642
if err != nil {
643-
return "", err
643+
return nil, err
644644
}
645645

646646
// Close response
@@ -649,7 +649,7 @@ func DownloadInvoicePDF(config DownloadInvoice) ([]byte, error) {
649649
// Read body data
650650
read, err := io.ReadAll(response.Body)
651651
if err != nil {
652-
return "", err
652+
return nil, err
653653
}
654654

655655
// Return data

0 commit comments

Comments
 (0)