feat: publish sanitized custom.97 source
This commit is contained in:
1022 files changed
+69903
-19207
No files matched your search
@@ -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
|
||||
}
|
||||
Reference in new issue
Block a user