add last_time
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-04-09 14:47:38 +07:00
parent d1f2c359a2
commit ada1a97999
12 changed files with 30 additions and 19 deletions
+2 -2
View File
@@ -38,7 +38,7 @@ func NewGoBotState(bot *tgbot.BotAPI, dataBase *db.DB) states.BotState {
}
}
func (s *goBotState) Do(text string, chatInfo *db.ChatInfo, username string) error {
func (s *goBotState) Do(text string, chatInfo *db.ChatInfo) error {
if chatInfo.Status == string(db.UserStateGo) {
if err := s.dataBase.SetStatusToChat(chatInfo.ChatID, db.UserState(text)); err != nil {
log.Println(err)
@@ -57,7 +57,7 @@ func (s *goBotState) Do(text string, chatInfo *db.ChatInfo, username string) err
log.Println(err)
continue
}
if err := s.dataBase.AddWorkout(chatInfo.ChatID, db.NewWorkout(workoutType, count, username)); err != nil {
if err := s.dataBase.AddWorkout(chatInfo.ChatID, db.NewWorkout(workoutType, count, chatInfo.Username)); err != nil {
log.Println(err)
continue
}