Skip to content

Commit

Permalink
Add baracek timeout + fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
kozaktomas committed Nov 26, 2024
1 parent af95362 commit f3471e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions backend/pkg/hook/botka.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,15 +278,15 @@ func (b *Botka) baracekHandler() wa.EventHandler {
continue
}

stock := "❓ "
stock := "❓"
if beer.Stock == shops.StockTypeAvailable {
stock = "🍺"
}

sb.WriteString(fmt.Sprintf("%s %s -> *%d* Kč\n", stock, strings.TrimPrefix(beer.Title, "sud "), beer.Price))
}

sb.WriteString("\n------\n🍺 - skladem\n - neznámý stav skladu")
sb.WriteString("\n------\n🍺 - skladem\n❓ - neznámý stav skladu")

err := b.whatsapp.SendText(from, sb.String())
return err
Expand Down
2 changes: 1 addition & 1 deletion backend/pkg/shops/baracek.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type Baracek struct {
func NewBaracek() *Baracek {
return &Baracek{
client: http.Client{
Timeout: 5 * time.Second,
Timeout: 10 * time.Second,
},
}
}
Expand Down

0 comments on commit f3471e0

Please sign in to comment.