нейминг кнопок
This commit is contained in:
@@ -9,14 +9,14 @@ import (
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
type Purchases struct {
|
||||
type Placements struct {
|
||||
WorkspaceID string
|
||||
ProjectID string
|
||||
ProjectTitle string
|
||||
BackState bot.State
|
||||
}
|
||||
|
||||
func (s *Purchases) Enter(b *bot.Bot, mode bot.RenderMode) {
|
||||
func (s *Placements) Enter(b *bot.Bot, mode bot.RenderMode) {
|
||||
jwt := b.Session.JWT
|
||||
if jwt == "" {
|
||||
log.Error().Msg("JWT is empty in session")
|
||||
@@ -27,7 +27,7 @@ func (s *Purchases) Enter(b *bot.Bot, mode bot.RenderMode) {
|
||||
s.renderPurchases(b, mode, jwt)
|
||||
}
|
||||
|
||||
func (s *Purchases) renderPurchases(b *bot.Bot, mode bot.RenderMode, jwt string) {
|
||||
func (s *Placements) renderPurchases(b *bot.Bot, mode bot.RenderMode, jwt string) {
|
||||
resp, err := b.Backend.GetPlacements(
|
||||
context.Background(),
|
||||
jwt,
|
||||
@@ -93,7 +93,7 @@ func (s *Purchases) renderPurchases(b *bot.Bot, mode bot.RenderMode, jwt string)
|
||||
b.Render(text, keyboard, mode)
|
||||
}
|
||||
|
||||
func (s *Purchases) HandleCallback(b *bot.Bot, u *echotron.Update) {
|
||||
func (s *Placements) HandleCallback(b *bot.Bot, u *echotron.Update) {
|
||||
if u.CallbackQuery == nil || u.CallbackQuery.Data == "" {
|
||||
return
|
||||
}
|
||||
@@ -131,8 +131,8 @@ func (s *Purchases) HandleCallback(b *bot.Bot, u *echotron.Update) {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Purchases) HandleMessage(_ *bot.Bot, _ *echotron.Update) { return }
|
||||
func (s *Placements) HandleMessage(_ *bot.Bot, _ *echotron.Update) { return }
|
||||
|
||||
func (s *Purchases) Handle(_ *bot.Bot, _ *echotron.Update) { return }
|
||||
func (s *Placements) Handle(_ *bot.Bot, _ *echotron.Update) { return }
|
||||
|
||||
func (s *Purchases) Exit() {}
|
||||
func (s *Placements) Exit() {}
|
||||
|
||||
Reference in New Issue
Block a user