Implement changing of passwords

This commit is contained in:
eikendev 2020-08-02 14:45:24 +02:00
parent d621333b6e
commit e1cd2d2f8e
No known key found for this signature in database
GPG key ID: A1BDB1B28C8EF694
7 changed files with 46 additions and 22 deletions

View file

@ -67,15 +67,20 @@ func (u *User) IntoExternalUser() *ExternalUser {
}
}
type userIdentification struct {
ID uint `uri:"id" binding:"required"`
}
// DeleteUser is used to process queries for deleting users.
type DeleteUser struct {
ID uint `uri:"id"`
userIdentification
}
// UpdateUser is used to process queries for updating users.
type UpdateUser struct {
ID uint `uri:"id" binding:"required"`
userIdentification
Name string `json:"name"`
Password string `json:"password"`
IsAdmin bool `json:"is_admin"`
MatrixID string `json:"matrix_id"`
}