mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2026-01-18 12:32:26 +01:00
fix:#16 added userAgent and fixed logging for room ical
This commit is contained in:
@@ -107,7 +107,7 @@ func CreateFeed(app model.AppType, modules []model.FeedCollection) (string, erro
|
||||
return token, nil
|
||||
}
|
||||
|
||||
func FeedRoom(app model.AppType, room string) (string, string, error) {
|
||||
func FeedRoom(app model.AppType, room string, userAgent string) (string, string, error) {
|
||||
|
||||
// Get all events for room
|
||||
events, err := htwkalenderGrpc.GetEventsByRoom(room, app.GrpcClient)
|
||||
@@ -121,7 +121,7 @@ func FeedRoom(app model.AppType, room string) (string, string, error) {
|
||||
// Generate one Hash for E-TAG from all events
|
||||
etag := functions.HashString(events.String())
|
||||
|
||||
cal := GenerateIcalFeed(events, map[string]model.FeedCollection{}, "")
|
||||
cal := GenerateIcalFeed(events, map[string]model.FeedCollection{}, userAgent)
|
||||
icalFeed := &model.FeedModel{Content: cal.Serialize(), ExpiresAt: model.JSONTime(time.Now().Add(expirationTime))}
|
||||
|
||||
return icalFeed.Content, etag, nil
|
||||
|
||||
Reference in New Issue
Block a user