Fix fuckup with weight service
This commit is contained in:
@@ -225,7 +225,7 @@ export namespace main {
|
|||||||
export class Weight {
|
export class Weight {
|
||||||
rowid: number;
|
rowid: number;
|
||||||
date: string;
|
date: string;
|
||||||
food: number;
|
weight: number;
|
||||||
|
|
||||||
static createFrom(source: any = {}) {
|
static createFrom(source: any = {}) {
|
||||||
return new Weight(source);
|
return new Weight(source);
|
||||||
@@ -235,7 +235,7 @@ export namespace main {
|
|||||||
if ('string' === typeof source) source = JSON.parse(source);
|
if ('string' === typeof source) source = JSON.parse(source);
|
||||||
this.rowid = source["rowid"];
|
this.rowid = source["rowid"];
|
||||||
this.date = source["date"];
|
this.date = source["date"];
|
||||||
this.food = source["food"];
|
this.weight = source["weight"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export class WailsWeight {
|
export class WailsWeight {
|
||||||
|
2
main.go
2
main.go
@@ -37,7 +37,6 @@ var (
|
|||||||
settingsService *SettingsService
|
settingsService *SettingsService
|
||||||
foodService *FoodService
|
foodService *FoodService
|
||||||
weightService *WeightService
|
weightService *WeightService
|
||||||
db *DB
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
@@ -60,6 +59,7 @@ func main() {
|
|||||||
log.Printf("Loaded settings as: %++v", Settings)
|
log.Printf("Loaded settings as: %++v", Settings)
|
||||||
|
|
||||||
foodService = &FoodService{db: &db}
|
foodService = &FoodService{db: &db}
|
||||||
|
weightService = &WeightService{db: &db}
|
||||||
|
|
||||||
// Create an instance of the app structure
|
// Create an instance of the app structure
|
||||||
app := NewApp()
|
app := NewApp()
|
||||||
|
Reference in New Issue
Block a user