generated from VLADIMIR/template
rename
This commit is contained in:
@@ -80,7 +80,7 @@ const grpcMsgLimit = 257 << 20
|
||||
|
||||
func main() {
|
||||
_ = godotenv.Load()
|
||||
localMode := os.Getenv("APP_MODE") == "local"
|
||||
venueMode := os.Getenv("APP_MODE") == "venue"
|
||||
|
||||
dbpool, err := pgxpool.New(context.Background(), os.Getenv("DATABASE_URL"))
|
||||
if err != nil {
|
||||
@@ -100,7 +100,7 @@ func main() {
|
||||
}
|
||||
}
|
||||
var emailSender email_sender.IEmailSender
|
||||
if !localMode {
|
||||
if !venueMode {
|
||||
emailSender = email_sender.NewSender(
|
||||
os.Getenv("SMTP_HOST"),
|
||||
os.Getenv("SMTP_PORT"),
|
||||
@@ -171,7 +171,7 @@ func main() {
|
||||
|
||||
participationService := participation_service.NewParticipationService(teamRepo, os.Getenv("APP_BASE_URL"))
|
||||
ticketService := ticket_service.NewTicketService(ticketRepo, os.Getenv("APP_BASE_URL"))
|
||||
if !localMode {
|
||||
if !venueMode {
|
||||
go participationService.RunParticipationEmails(context.Background(), emailSender, os.Getenv("PARTICIPATION_SECRET"), os.Getenv("GAME_TIMEZONE"))
|
||||
go reviewService.RunReviewReminderEmails(context.Background(), emailSender)
|
||||
}
|
||||
@@ -295,7 +295,7 @@ func main() {
|
||||
}
|
||||
|
||||
mainMux := http.NewServeMux()
|
||||
if !localMode {
|
||||
if !venueMode {
|
||||
mainMux.Handle("POST /api/games/{id}/registrations", app.TeamRegistrationHandler(os.Getenv("YANDEX_FORMS_TOKEN"), teamService.RegisterTeam))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user