feat:#51 added TR fix for room mapping

This commit is contained in:
Elmar Kresse
2024-08-19 12:43:10 +02:00
parent 91d56493c8
commit 5c8ebc9ba2
3 changed files with 65 additions and 12 deletions

View File

@@ -45,7 +45,7 @@ func GetRoomScheduleForDay(app *pocketbase.PocketBase, room string, date string)
func GetRoomSchedule(app *pocketbase.PocketBase, room string, from string, to string, mapped string) ([]model.AnonymizedEventDTO, error) {
if mapped == "true" {
room = functions.MapRoom(room)
room = functions.MapRoom(room, false)
}
roomSchedule, err := db.GetRoomSchedule(app, room, from, to)
@@ -57,7 +57,7 @@ func GetRoomSchedule(app *pocketbase.PocketBase, room string, from string, to st
// If mapped is "true", map the rooms again after anonymization
if mapped == "true" {
for i := range anonymizedRoomSchedule {
anonymizedRoomSchedule[i].Rooms = functions.MapRoom(anonymizedRoomSchedule[i].Rooms)
anonymizedRoomSchedule[i].Rooms = functions.MapRoom(anonymizedRoomSchedule[i].Rooms, true)
}
}