mirror of
https://github.com/rjNemo/rentease.git
synced 2026-06-12 13:46:51 +00:00
fix linter warning
This commit is contained in:
parent
c1b1333a88
commit
c79232a019
2 changed files with 4 additions and 4 deletions
|
|
@ -119,7 +119,7 @@ func (ps PdfService) BuildReport(r *booking.Report, period string, month, year i
|
||||||
|
|
||||||
payload, err := json.Marshal(data)
|
payload, err := json.Marshal(data)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warnf("Error marshalling JSON:", err)
|
log.Warnf("Error marshalling JSON: %s", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -129,7 +129,7 @@ func (ps PdfService) BuildReport(r *booking.Report, period string, month, year i
|
||||||
func (ps PdfService) sendData(payload []byte) error {
|
func (ps PdfService) sendData(payload []byte) error {
|
||||||
req, err := http.NewRequest("POST", ps.url, bytes.NewBuffer(payload))
|
req, err := http.NewRequest("POST", ps.url, bytes.NewBuffer(payload))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warnf("Error creating request:", err)
|
log.Warnf("Error creating request: %s", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -139,7 +139,7 @@ func (ps PdfService) sendData(payload []byte) error {
|
||||||
client := &http.Client{}
|
client := &http.Client{}
|
||||||
resp, err := client.Do(req)
|
resp, err := client.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warnf("Error sending request:", err)
|
log.Warnf("Error sending request: %s", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
|
||||||
|
|
@ -255,7 +255,7 @@ func handleCreateItem(bs *booking.Service, cs *calendar.Service, hc *config.Host
|
||||||
fmt.Sprintf("Reservation: %s\n %d voyageur(s)\n", b.Name, b.CustomerNumber),
|
fmt.Sprintf("Reservation: %s\n %d voyageur(s)\n", b.Name, b.CustomerNumber),
|
||||||
b.From, b.To,
|
b.From, b.To,
|
||||||
); err != nil {
|
); err != nil {
|
||||||
log.Printf("could not create event %w", err)
|
log.Warnf("could not create event: %s", err)
|
||||||
captureError(c, err)
|
captureError(c, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue