Implement creating food
This commit is contained in:
2
frontend/wailsjs/go/main/App.d.ts
vendored
2
frontend/wailsjs/go/main/App.d.ts
vendored
@@ -6,6 +6,8 @@ export function CreateFood(arg1:main.Food):Promise<main.WailsFood1>;
|
||||
|
||||
export function GetFood():Promise<main.WailsFood>;
|
||||
|
||||
export function GetLastPer100(arg1:string):Promise<main.WailsPer100>;
|
||||
|
||||
export function GetSettings():Promise<main.settings>;
|
||||
|
||||
export function SetSetting(arg1:string,arg2:any):Promise<main.settings>;
|
||||
|
||||
@@ -10,6 +10,10 @@ export function GetFood() {
|
||||
return window['go']['main']['App']['GetFood']();
|
||||
}
|
||||
|
||||
export function GetLastPer100(arg1) {
|
||||
return window['go']['main']['App']['GetLastPer100'](arg1);
|
||||
}
|
||||
|
||||
export function GetSettings() {
|
||||
return window['go']['main']['App']['GetSettings']();
|
||||
}
|
||||
|
||||
@@ -92,6 +92,22 @@ export namespace main {
|
||||
return a;
|
||||
}
|
||||
}
|
||||
export class WailsPer100 {
|
||||
data: number;
|
||||
success: boolean;
|
||||
error?: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new WailsPer100(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.data = source["data"];
|
||||
this.success = source["success"];
|
||||
this.error = source["error"];
|
||||
}
|
||||
}
|
||||
export class settings {
|
||||
foodDaysLookback: number;
|
||||
foodAggregatedDaysLookback: number;
|
||||
|
||||
Reference in New Issue
Block a user