rf/changes name from passwordhash to new_password in api.updateAccount
This commit is contained in:
parent
98cbada07d
commit
877fccbf46
@ -184,7 +184,7 @@ func (server *Server) updateAccountPrivacy(ctx *gin.Context) {
|
||||
|
||||
type updateAccountRequest struct {
|
||||
ID int64 `binding:"required" json:"ID"`
|
||||
Passwordhash string `json:"passwordhash"`
|
||||
NewPassword string `json:"new_password"`
|
||||
Firstname string `json:"firstname"`
|
||||
Lastname string `json:"lastname"`
|
||||
Birthday time.Time `json:"birthday"`
|
||||
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user