chore: Add updateUserPasswordLoggedInOnly endpoint for self-hosted instances
This commit is contained in:
parent
5320b4e980
commit
6dc8092ff4
2 changed files with 63 additions and 9 deletions
|
@ -162,3 +162,7 @@ func (r *UserRepository) DeleteAPIToken(c context.Context, userID int, tokenID s
|
|||
func (r *UserRepository) UpdateNotificationTarget(c context.Context, userID int, targetID string, targetType uModel.UserNotificationType) error {
|
||||
return r.db.WithContext(c).Model(&uModel.UserNotificationTarget{}).Where("user_id = ? AND type = ?", userID, targetType).Update("target_id", targetID).Error
|
||||
}
|
||||
|
||||
func (r *UserRepository) UpdatePasswordByUserId(c context.Context, userID int, password string) error {
|
||||
return r.db.WithContext(c).Model(&uModel.User{}).Where("id = ?", userID).Update("password", password).Error
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue