bug fix getUnsignedReports

This commit is contained in:
al8763be 2024-03-29 13:02:31 +01:00
parent c466a98b15
commit bcb661dc22
2 changed files with 9 additions and 2 deletions

View file

@ -137,6 +137,11 @@ func (gs *GState) GetUnsignedReports(c *fiber.Ctx) error {
log.Info("Failed to get project manager ID")
return c.Status(500).SendString("Failed to get project manager ID")
}
if !isProjectManager {
log.Info("User is not a project manager")
return c.Status(401).SendString("User is not a project manager")
}
log.Info("User is Project Manager: ", isProjectManager)
// Call the database function to get the unsigned weekly reports