feat:#56 added etag hash

This commit is contained in:
Elmar Kresse
2024-10-04 18:35:09 +02:00
parent 5ce70983f2
commit 97daa7b73c
4 changed files with 27 additions and 6 deletions

View File

@@ -34,7 +34,7 @@ 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)
results, eTag, err := ical.Feed(app, token)
if errors.Is(err, ical.FeedDeletedError) {
return c.SendStatus(fiber.StatusGone)
@@ -48,6 +48,7 @@ func AddFeedRoutes(app model.AppType) {
c.Response().Header.Set("charset", "utf-8")
c.Response().Header.Set("Content-Disposition", "inline")
c.Response().Header.Set("filename", "calendar.ics")
c.Response().Header.Set("ETag", eTag)
return c.SendString(results)
})