feat:#49 added new ical lib for description formatting

This commit is contained in:
Elmar Kresse
2024-09-24 16:39:23 +02:00
parent 7b70499171
commit c00990dd8e
9 changed files with 299 additions and 122 deletions

View File

@@ -34,7 +34,13 @@ func AddFeedRoutes(app model.AppType) {
app.Fiber.Get("/api/feed", func(c fiber.Ctx) error {
token := c.Query("token")
results, err := ical.Feed(app, token)
// get request userAgent and check if it is Thunderbird
userAgent := c.Get("User-Agent")
slog.Info("User-Agent", "userAgent", userAgent)
results, err := ical.Feed(app, token, userAgent)
if errors.Is(err, ical.FeedDeletedError) {
return c.SendStatus(fiber.StatusGone)