feat:#22 refactor to cache room schedule and webworker config

This commit is contained in:
survellow
2024-08-02 23:55:58 +02:00
parent e4bde20397
commit 4fcfa76e1c
14 changed files with 164 additions and 83 deletions

View File

@@ -181,9 +181,7 @@ func AddRoutes(app *pocketbase.PocketBase) {
Method: http.MethodGet,
Path: "/api/schedule/rooms",
Handler: func(c echo.Context) error {
from := c.QueryParam("from")
to := c.QueryParam("to")
rooms, err := room.GetRoomOccupancyList(app, from, to, RoomOccupancyGranularity)
rooms, err := room.GetRoomOccupancyList(app, RoomOccupancyGranularity)
if err != nil {
slog.Error("Failed to get room occupancy: %v", "error", err)