mirror of
https://github.com/gotify/server.git
synced 2024-01-28 15:20:56 +03:00
fix: remove unused code
This commit is contained in:
13
api/user.go
13
api/user.go
@@ -452,19 +452,6 @@ func (a *UserAPI) UpdateUserByID(ctx *gin.Context) {
|
||||
})
|
||||
}
|
||||
|
||||
func (a *UserAPI) toInternalUser(response *model.UserExternal, newPass string, pw []byte) *model.User {
|
||||
user := &model.User{
|
||||
Name: response.Name,
|
||||
Admin: response.Admin,
|
||||
}
|
||||
if newPass != "" {
|
||||
user.Pass = password.CreatePassword(newPass, a.PasswordStrength)
|
||||
} else {
|
||||
user.Pass = pw
|
||||
}
|
||||
return user
|
||||
}
|
||||
|
||||
func toExternalUser(internal *model.User) *model.UserExternal {
|
||||
return &model.UserExternal{
|
||||
Name: internal.Name,
|
||||
|
||||
Reference in New Issue
Block a user