Fix for CreateProject handler
This commit is contained in:
parent
d99de54c5d
commit
c6d9307979
1 changed files with 2 additions and 2 deletions
|
@ -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())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue