Restructures configuration for birthdays and adds pictures directory

This commit is contained in:
Miguel de la Cruz 2023-07-10 21:08:05 +02:00
parent c7399eb9da
commit ec2cdfdeaa
9 changed files with 55 additions and 31 deletions

View file

@ -13,12 +13,12 @@ import (
type TelegramNotificationService struct {
logger *log.Logger
config *model.TelegramNotificationsConfig
config *model.Config
bot *tgbotapi.BotAPI
}
func NewTelegramNotificationService(logger *log.Logger, config *model.TelegramNotificationsConfig) (*TelegramNotificationService, error) {
bot, err := tgbotapi.NewBotAPI(config.BotToken)
func NewTelegramNotificationService(logger *log.Logger, config *model.Config) (*TelegramNotificationService, error) {
bot, err := tgbotapi.NewBotAPI(config.TelegramNotifications.BotToken)
if err != nil {
return nil, fmt.Errorf("cannot create bot: %w", err)
}