feat: publish sanitized custom.97 source

This commit is contained in:
cneicy committed 2026-10-27 20:43:39 +08:00
1 parent 8e6ed0317b
commit 86c0276156
1022 files changed
+69903 -19207

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
package model
// BotBalanceAccount contains only the fields needed by the notification bot.
type BotBalanceAccount struct {
ID int `gorm:"column:id"`
Status int
Quota int
}
func FindBotBalanceAccounts(email string, ids []int) ([]BotBalanceAccount, error) {
accounts := []BotBalanceAccount{}
query := DB.Model(&User{}).Select("id", "status", "quota")
if email != "" {
query = query.Where("LOWER(email) = ?", NormalizeEmail(email)).Limit(2)
} else {
query = query.Where("id IN ?", ids)
}
err := query.Find(&accounts).Error
return accounts, err
}