Handle entering multiple weights in a single day
The graph would otherwise use I believe the first entry? Now we use the average.
This commit is contained in:
parent
39b87ba932
commit
32da68e905
|
@ -28,8 +28,8 @@ export default function ViewWeightGraph() {
|
|||
weightRepo
|
||||
.createQueryBuilder()
|
||||
.select("STRFTIME('%Y-%m-%d', created)", "created")
|
||||
.addSelect("AVG(value) as value")
|
||||
.addSelect("unit")
|
||||
.addSelect("value")
|
||||
.where("DATE(created) >= DATE('now', 'weekday 0', :difference)", {
|
||||
difference,
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue
Block a user