Fix for IsProjectManagerHandler

This commit is contained in:
Imbus 2024-03-29 12:41:51 +01:00
parent 8d7d815745
commit 9edcc74ee2

View file

@ -219,7 +219,7 @@ func (gs *GState) IsProjectManagerHandler(c *fiber.Ctx) error {
username := claims["name"].(string) username := claims["name"].(string)
// Extract necessary parameters from the request query string // Extract necessary parameters from the request query string
projectName := c.Query("projectName") projectName := c.Params("projectName")
log.Info("Checking if user ", username, " is a project manager for project ", projectName) log.Info("Checking if user ", username, " is a project manager for project ", projectName)
@ -231,7 +231,7 @@ func (gs *GState) IsProjectManagerHandler(c *fiber.Ctx) error {
} }
// Return the result as JSON // Return the result as JSON
return c.JSON(map[string]bool{"isProjectManager": isManager}) return c.JSON(fiber.Map{"isProjectManager": isManager})
} }
func (gs *GState) GetProjectTimesHandler(c *fiber.Ctx) error { func (gs *GState) GetProjectTimesHandler(c *fiber.Ctx) error {