Rework search to return a list

Like a proper search would!"
This commit is contained in:
2024-08-13 17:41:01 +02:00
parent a6626761e7
commit 8fd8d53cc3
6 changed files with 61 additions and 32 deletions

6
app.go
View File

@@ -44,12 +44,12 @@ func (a *App) UpdateFood(food Food) WailsFood1 {
return WailsFood1{Data: data, Success: true}
}
func (a *App) GetLastPer100(name string) WailsFood1 {
func (a *App) GetLastPer100(name string) WailsFoodSearch {
data, err := foodService.GetLastPer100(name)
if err != nil {
return WailsFood1{Success: false, Error: err.Error()}
return WailsFoodSearch{Success: false, Error: err.Error()}
}
return WailsFood1{Data: data, Success: true}
return WailsFoodSearch{Data: data, Success: true}
}
func (a *App) GetDailyFood() WailsAggregateFood {