From 6c31820178b348430e1b5904597a8182a68020da Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Tue, 31 May 2022 14:53:53 +0200 Subject: [PATCH] admin: Return the updated team struct after password regeneration --- admin/api/password.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/api/password.go b/admin/api/password.go index 03f4495e..3304f814 100644 --- a/admin/api/password.go +++ b/admin/api/password.go @@ -89,14 +89,14 @@ func declareTeamsPasswordRoutes(router *gin.RouterGroup) { } else { team.Password = &passwd - t, err := team.Update() + _, err := team.Update() if err != nil { log.Println("Unable to Update Team:", err.Error()) c.AbortWithStatusJSON(http.StatusInternalServerError, gin.H{"errmsg": "Something went wrong when updating the new team password"}) return } - c.JSON(http.StatusOK, t) + c.JSON(http.StatusOK, team) } }) }