From 877fccbf4675d452d4b477c2608a999c7919aef1 Mon Sep 17 00:00:00 2001 From: itsscb Date: Sun, 1 Oct 2023 23:33:39 +0200 Subject: [PATCH] rf/changes name from passwordhash to new_password in api.updateAccount --- api/account.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/api/account.go b/api/account.go index 4f2f009..c8af2ee 100644 --- a/api/account.go +++ b/api/account.go @@ -183,17 +183,17 @@ func (server *Server) updateAccountPrivacy(ctx *gin.Context) { } type updateAccountRequest struct { - ID int64 `binding:"required" json:"ID"` - Passwordhash string `json:"passwordhash"` - Firstname string `json:"firstname"` - Lastname string `json:"lastname"` - Birthday time.Time `json:"birthday"` - Email string `json:"email"` - Phone string `json:"phone"` - City string `json:"city"` - Zip string `json:"zip"` - Street string `json:"street"` - Country string `json:"country"` + ID int64 `binding:"required" json:"ID"` + NewPassword string `json:"new_password"` + Firstname string `json:"firstname"` + Lastname string `json:"lastname"` + Birthday time.Time `json:"birthday"` + Email string `json:"email"` + Phone string `json:"phone"` + City string `json:"city"` + Zip string `json:"zip"` + Street string `json:"street"` + Country string `json:"country"` } func (server *Server) updateAccount(ctx *gin.Context) { @@ -220,8 +220,8 @@ func (server *Server) updateAccount(ctx *gin.Context) { ID: req.ID, Changer: authPayload.Email, Passwordhash: sql.NullString{ - String: req.Passwordhash, - Valid: req.Passwordhash != "", + String: req.NewPassword, + Valid: req.NewPassword != "", }, Firstname: sql.NullString{ String: req.Firstname,