Fix for CreateProject handler

This commit is contained in:
Imbus 2024-03-16 22:57:48 +01:00
parent d99de54c5d
commit c6d9307979

View file

@ -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())
}