mirror of
https://codeberg.org/scip/kleingebaeck.git
synced 2025-12-16 12:01:00 +01:00
add color detail as well (#119)
Co-authored-by: Thomas von Dein <tom@vondein.org>
This commit is contained in:
@@ -126,12 +126,14 @@ func ScrapeAd(fetch *Fetcher, uri string) error {
|
||||
}
|
||||
|
||||
for _, detail := range advertisement.Details {
|
||||
if slices.Contains(CONDITIONS, detail) {
|
||||
switch {
|
||||
case slices.Contains(CONDITIONS, detail):
|
||||
advertisement.Condition = detail
|
||||
} else {
|
||||
case slices.Contains(COLORS, detail):
|
||||
advertisement.Color = detail
|
||||
default:
|
||||
advertisement.Type = detail
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
advertisement.CalculateExpire()
|
||||
|
||||
Reference in New Issue
Block a user