diff --git a/backend/internal/handlers/global_state.go b/backend/internal/handlers/global_state.go index f8c7ce1..f7172f5 100644 --- a/backend/internal/handlers/global_state.go +++ b/backend/internal/handlers/global_state.go @@ -165,9 +165,9 @@ func (gs *GState) CreateProject(c *fiber.Ctx) error { // Get the username from the token and set it as the owner of the project // This is ugly but claims := user.Claims.(jwt.MapClaims) - p.Owner = claims["name"].(string) + owner := claims["name"].(string) - if err := gs.Db.AddProject(p.Name, p.Description, p.Owner); err != nil { + if err := gs.Db.AddProject(p.Name, p.Description, owner); err != nil { return c.Status(500).SendString(err.Error()) }