Skip to content

Commit

Permalink
fix(backend): remove currentRooms check for backend health
Browse files Browse the repository at this point in the history
This check currently has issues when the database table is empty (i.e no
users)
  • Loading branch information
joshzcold committed Jan 11, 2025
1 parent 0d9f298 commit 8fa0fe7
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions backend/api/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,13 @@ func checkDatabase() ComponentStatus {
return status
}

rooms := store.currentRooms()
if rooms == nil {
status.Status = "down"
status.Error = "failed to query rooms"
}
// TODO need to replace this with some kind of check that just checks that the store
// DB table is ready, so that this works when the database has no users
// rooms := store.currentRooms()
// if rooms == nil {
// status.Status = "down"
// status.Error = "failed to query rooms"
// }

return status
}

0 comments on commit 8fa0fe7

Please sign in to comment.