mirror of
https://github.com/AmanTahiliani/box-box.git
synced 2026-08-07 19:56:18 -04:00
fix(#76): report request-scoped data freshness
This commit is contained in:
@@ -17,6 +17,7 @@ func (s *Server) handleRaceHub(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
if !s.hasLocalQuery() {
|
||||
markDataResponse(w, "local", "limited")
|
||||
writeJSON(w, emptyRaceHub(sessionKey))
|
||||
return
|
||||
}
|
||||
@@ -26,6 +27,7 @@ func (s *Server) handleRaceHub(w http.ResponseWriter, r *http.Request) {
|
||||
writeError(w, err, http.StatusInternalServerError, false)
|
||||
return
|
||||
}
|
||||
markLocalResponse(w, hub.Source == query.ResponseSourcePartial)
|
||||
writeJSON(w, hub)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user