From dc55f9c0097e1c36b85d7666071b840b902920e9 Mon Sep 17 00:00:00 2001 From: Leonardo Bishop Date: Mon, 20 Jan 2025 02:56:25 +0000 Subject: Add calendar support --- main.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'main.go') diff --git a/main.go b/main.go index ae0ef9d..d5706b0 100644 --- a/main.go +++ b/main.go @@ -7,8 +7,10 @@ import ( "github.com/LMBishop/confplanner/api" config "github.com/LMBishop/confplanner/internal" + "github.com/LMBishop/confplanner/pkg/calendar" "github.com/LMBishop/confplanner/pkg/database" "github.com/LMBishop/confplanner/pkg/favourites" + "github.com/LMBishop/confplanner/pkg/ical" "github.com/LMBishop/confplanner/pkg/schedule" "github.com/LMBishop/confplanner/pkg/user" ) @@ -42,12 +44,16 @@ func run() error { if err != nil { return fmt.Errorf("failed to create schedule service: %w", err) } + calendarService := calendar.NewService(pool) + icalService := ical.NewService(favouritesService, scheduleService) app := api.NewServer(api.ApiServices{ UserService: userService, FavouritesService: favouritesService, ScheduleService: scheduleService, - }) + CalendarService: calendarService, + IcalService: icalService, + }, c.BaseURL) slog.Info("Server is listening", "host", c.Server.Host, "port", c.Server.Port) -- cgit v1.2.3-70-g09d2