mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-07 20:29:13 +02:00
feat:#56 added etag hash
This commit is contained in:
@@ -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)
|
||||
})
|
||||
|
Reference in New Issue
Block a user