From e850d53715d828bf60eb08f3cf6646dac889f0c7 Mon Sep 17 00:00:00 2001 From: Patrick Pfeiffer Date: Tue, 2 Jan 2024 08:51:23 +0100 Subject: [PATCH] (BIDS-2896) frontend: fix wrong montly number of api-calls in user-settings --- db/frontend.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/frontend.go b/db/frontend.go index a32d6f7111..425da0b6db 100644 --- a/db/frontend.go +++ b/db/frontend.go @@ -688,7 +688,7 @@ func GetUserAPIKeyStatistics(apikey *string) (*types.ApiStatistics, error) { FROM api_statistics WHERE - ts > NOW() - INTERVAL '1 month' AND apikey = $1 + ts > DATE_TRUNC('month', NOW()) AND apikey = $1 )` err := FrontendWriterDB.Get(stats, query, apikey)