😑 using search-a-licious API now...

This commit is contained in:
cdricms
2025-12-06 18:43:14 +01:00
parent 44420002c7
commit dd191b585d
7 changed files with 35 additions and 23 deletions

View File

@@ -35,10 +35,10 @@ public struct NutriscoreData: Sendable, Codable {
isBeverage = try container.decodeIfPresent(
Int.self, forKey: .isBeverage)
isCheese = try container.decodeStringOrInt(forKey: .isCheese)
isWater = try container.decodeStringOrInt(forKey: .isWater)
isFat = try container.decodeStringOrInt(forKey: .isFat)
energy = try container.decodeStringOrInt(forKey: .energy)
isCheese = try container.decodeIntOrString(forKey: .isCheese)
isWater = try container.decodeIntOrString(forKey: .isWater)
isFat = try container.decodeIntOrString(forKey: .isFat)
energy = try container.decodeIntOrString(forKey: .energy)
}