feat: able to test all enabled channels (#59)

This commit is contained in:
JustSong
2023-05-15 12:36:55 +08:00
parent 570b3bc71c
commit d267211ee7
5 changed files with 116 additions and 13 deletions

View File

@@ -234,3 +234,8 @@ func DecreaseUserQuota(id int, quota int) (err error) {
err = DB.Model(&User{}).Where("id = ?", id).Update("quota", gorm.Expr("quota - ?", quota)).Error
return err
}
func GetRootUserEmail() (email string) {
DB.Model(&User{}).Where("role = ?", common.RoleRootUser).Select("email").Find(&email)
return email
}