mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-05 23:54:25 +00:00
fix(ai-usage): align since date with top-of-hour bucket boundaries
This commit is contained in:
@@ -117,6 +117,9 @@ export class AiUsageService {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
since.setMinutes(0, 0, 0)
|
||||||
|
|
||||||
|
|
||||||
if (!params.userId) {
|
if (!params.userId) {
|
||||||
// Return Team-Level Usage (userId = null)
|
// Return Team-Level Usage (userId = null)
|
||||||
const teamRecords = await prisma.aiUsage.findMany({
|
const teamRecords = await prisma.aiUsage.findMany({
|
||||||
|
|||||||
Reference in New Issue
Block a user