From 6c4fe7bda3a6340d412e8bc558c763e36ad865c0 Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Mon, 15 Apr 2024 11:58:43 +0200 Subject: [PATCH] Statistics api again --- backend/internal/handlers/reports/Statistics.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/internal/handlers/reports/Statistics.go b/backend/internal/handlers/reports/Statistics.go index 71d7540..dac017d 100644 --- a/backend/internal/handlers/reports/Statistics.go +++ b/backend/internal/handlers/reports/Statistics.go @@ -38,6 +38,10 @@ func GetStatistics(c *fiber.Ctx) error { return c.Status(403).SendString("Unauthorized access") } + if pm && userNameParam != "" { + username = userNameParam + } + // Retrieve statistics for the project from the database statistics, err := db.GetDb(c).ReportStatistics(username, projectName) if err != nil {