fix off-by-one error in user stat rendering

This commit is contained in:
byte[] 2021-04-04 13:02:58 -04:00
parent 838b449193
commit 192cb727a0

View file

@ -193,7 +193,7 @@ defmodule PhilomenaWeb.ProfileController do
last_90 = last_90 =
UserStatistic UserStatistic
|> where(user_id: ^user.id) |> where(user_id: ^user.id)
|> where([us], us.day > ^(now - 89)) |> where([us], us.day >= ^(now - 89))
|> Repo.all() |> Repo.all()
|> Map.new(&{now - &1.day, &1}) |> Map.new(&{now - &1.day, &1})