feat: 添加Yggdrasil密码重置功能,更新依赖和配置
This commit is contained in:
@@ -14,3 +14,9 @@ func GetYggdrasilPasswordById(Id int64) (string, error) {
|
||||
}
|
||||
return yggdrasil.Password, nil
|
||||
}
|
||||
|
||||
// ResetYggdrasilPassword 重置Yggdrasil密码
|
||||
func ResetYggdrasilPassword(userId int64, newPassword string) error {
|
||||
db := database.MustGetDB()
|
||||
return db.Model(&model.Yggdrasil{}).Where("id = ?", userId).Update("password", newPassword).Error
|
||||
}
|
||||
Reference in New Issue
Block a user