Task
Implement POST /lamps/bulk-toggle with request-scoped caching to avoid querying the same room multiple times.
Endpoint
POST /lamps/bulk-toggle
{
"lampIds": ["uuid1", "uuid2", "uuid3"],
"status": true
}
Functional Requirement
Must not query the same room multiple times even if multiple lamps belong to the same room.
Implementation Hints
- Use a mutableMapOf<UUID, Room>() as request-scoped cache
- Check cache before querying database
- Store fetched rooms for reuse within same request
Acceptance Criteria
Parent Issue
Relates to #289
Task
Implement
POST /lamps/bulk-togglewith request-scoped caching to avoid querying the same room multiple times.Endpoint
POST /lamps/bulk-toggle{ "lampIds": ["uuid1", "uuid2", "uuid3"], "status": true }Functional Requirement
Must not query the same room multiple times even if multiple lamps belong to the same room.
Implementation Hints
Acceptance Criteria
Parent Issue
Relates to #289