rf/changes name from passwordhash to new_password in api.updateAccount
This commit is contained in:
parent
98cbada07d
commit
877fccbf46
@ -183,17 +183,17 @@ 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"`
|
||||||
Email string `json:"email"`
|
Email string `json:"email"`
|
||||||
Phone string `json:"phone"`
|
Phone string `json:"phone"`
|
||||||
City string `json:"city"`
|
City string `json:"city"`
|
||||||
Zip string `json:"zip"`
|
Zip string `json:"zip"`
|
||||||
Street string `json:"street"`
|
Street string `json:"street"`
|
||||||
Country string `json:"country"`
|
Country string `json:"country"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (server *Server) updateAccount(ctx *gin.Context) {
|
func (server *Server) updateAccount(ctx *gin.Context) {
|
||||||
@ -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