mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
rework user and admin profiles
users and admins can now also update their email and description
This commit is contained in:
@@ -28,8 +28,19 @@ type pwdChange struct {
|
||||
NewPassword string `json:"new_password"`
|
||||
}
|
||||
|
||||
type apiKeyAuth struct {
|
||||
AllowAPIKeyAuth bool `json:"allow_api_key_auth"`
|
||||
type baseProfile struct {
|
||||
Email string `json:"email,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
AllowAPIKeyAuth bool `json:"allow_api_key_auth"`
|
||||
}
|
||||
|
||||
type adminProfile struct {
|
||||
baseProfile
|
||||
}
|
||||
|
||||
type userProfile struct {
|
||||
baseProfile
|
||||
PublicKeys []string `json:"public_keys,omitempty"`
|
||||
}
|
||||
|
||||
func sendAPIResponse(w http.ResponseWriter, r *http.Request, err error, message string, code int) {
|
||||
|
||||
Reference in New Issue
Block a user