feat: cache protocol realtime raw
This commit is contained in:
@@ -44,6 +44,9 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
case len(parts) == 3 && parts[1] == "protocols":
|
||||
snapshot, err := h.repository.GetProtocol(r.Context(), vin, envelope.Protocol(strings.ToUpper(parts[2])))
|
||||
writeResult(w, snapshot, err)
|
||||
case len(parts) == 3 && parts[1] == "realtime-raw":
|
||||
payload, err := h.repository.GetRealtimeRaw(r.Context(), vin, envelope.Protocol(strings.ToUpper(parts[2])))
|
||||
writeResult(w, payload, err)
|
||||
default:
|
||||
writeError(w, http.StatusNotFound, "route not found")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user