Rework lastper100 to return a food instead of float32
This commit is contained in:
6
app.go
6
app.go
@@ -44,12 +44,12 @@ func (a *App) UpdateFood(food Food) WailsFood1 {
|
||||
return WailsFood1{Data: data, Success: true}
|
||||
}
|
||||
|
||||
func (a *App) GetLastPer100(name string) WailsPer100 {
|
||||
func (a *App) GetLastPer100(name string) WailsFood1 {
|
||||
data, err := foodService.GetLastPer100(name)
|
||||
if err != nil {
|
||||
return WailsPer100{Success: false, Error: err.Error()}
|
||||
return WailsFood1{Success: false, Error: err.Error()}
|
||||
}
|
||||
return WailsPer100{Data: data, Success: true}
|
||||
return WailsFood1{Data: data, Success: true}
|
||||
}
|
||||
|
||||
func (a *App) GetDailyFood() WailsAggregateFood {
|
||||
|
Reference in New Issue
Block a user