You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: server/logic.ts
+11-14Lines changed: 11 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -160,10 +160,7 @@ export class Logic {
160
160
}
161
161
if(connection){
162
162
if(vehicle.charge_id!==null){
163
-
charge=awaitthis.db.pg.one(
164
-
`SELECT * FROM charge WHERE charge_id = $1`,
165
-
[vehicle.charge_id]
166
-
);
163
+
charge=awaitthis.db.pg.one(`SELECT * FROM charge WHERE charge_id = $1`,[vehicle.charge_id]);
167
164
}
168
165
if(charge){
169
166
// TODO: Why didn't we just use charge.end_added - charge.start_added?
@@ -226,17 +223,17 @@ export class Logic {
226
223
log(LogLevel.Debug,`Calculated charge curve between ${chargeCurrent.start_level}% and ${vehicle.level}% is ${(used/60.0).toFixed(2)}kWh in ${(duration/60.0).toFixed(2)}m`);
0 commit comments