Add missing where clause to filter non-admin users in stats query
This commit is contained in:
parent
e1e368668c
commit
41decd54f2
1 changed files with 1 additions and 0 deletions
|
|
@ -13,6 +13,7 @@ export const statsRouter = createTRPCRouter({
|
|||
sql<Date>`date_trunc('day', created_at)`.as("date"),
|
||||
eb.fn.count<number>("id").as("value"),
|
||||
])
|
||||
.where("isAdmin", "=", false)
|
||||
.groupBy("date")
|
||||
.orderBy("date")
|
||||
.execute()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue