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 {
|
type updateAccountRequest struct {
|
||||||
ID int64 `binding:"required" json:"ID"`
|
ID int64 `binding:"required" json:"ID"`
|
||||||
Passwordhash string `json:"passwordhash"`
|
NewPassword string `json:"new_password"`
|
||||||
Firstname string `json:"firstname"`
|
Firstname string `json:"firstname"`
|
||||||
Lastname string `json:"lastname"`
|
Lastname string `json:"lastname"`
|
||||||
Birthday time.Time `json:"birthday"`
|
Birthday time.Time `json:"birthday"`
|
||||||
@ -220,8 +220,8 @@ func (server *Server) updateAccount(ctx *gin.Context) {
|
|||||||
ID: req.ID,
|
ID: req.ID,
|
||||||
Changer: authPayload.Email,
|
Changer: authPayload.Email,
|
||||||
Passwordhash: sql.NullString{
|
Passwordhash: sql.NullString{
|
||||||
String: req.Passwordhash,
|
String: req.NewPassword,
|
||||||
Valid: req.Passwordhash != "",
|
Valid: req.NewPassword != "",
|
||||||
},
|
},
|
||||||
Firstname: sql.NullString{
|
Firstname: sql.NullString{
|
||||||
String: req.Firstname,
|
String: req.Firstname,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user