- refactoring

This commit is contained in:
nistootsin 2025-05-03 08:52:31 +03:30
parent 0cebf714da
commit cddcad2c4f
2 changed files with 2 additions and 2 deletions

View file

@ -2028,7 +2028,7 @@ func (s *InboundService) GetOnlineClients() []string {
}
func (s *InboundService) GetValidEmails(emails []string) ([]string, []string, error) {
func (s *InboundService) FilterAndSortClientEmails(emails []string) ([]string, []string, error) {
db := database.GetDB()
// Step 1: Get ClientTraffic records for emails in the input list

View file

@ -1464,7 +1464,7 @@ func (t *Tgbot) answerCallback(callbackQuery *telego.CallbackQuery, isAdmin bool
t.SendMsgToTgbot(chatId, t.I18nBot("tgbot.answers.errorOperation"), tu.ReplyKeyboardRemove())
return
}
valid_emails ,extra_emails, err := t.inboundService.GetValidEmails(emails)
valid_emails ,extra_emails, err := t.inboundService.FilterAndSortClientEmails(emails)
for _, valid_emails := range valid_emails {
traffic, err := t.inboundService.GetClientTrafficByEmail(valid_emails)