diff --git a/storage/remote/codec.go b/storage/remote/codec.go index e13251c565..5ae26f9958 100644 --- a/storage/remote/codec.go +++ b/storage/remote/codec.go @@ -45,8 +45,8 @@ func DecodeReadRequest(r *http.Request) (*ReadRequest, error) { return &req, nil } -// EncodReadResponse writes a remote.Response to a http.ResponseWriter. -func EncodReadResponse(resp *ReadResponse, w http.ResponseWriter) error { +// EncodeReadResponse writes a remote.Response to a http.ResponseWriter. +func EncodeReadResponse(resp *ReadResponse, w http.ResponseWriter) error { data, err := proto.Marshal(resp) if err != nil { return err diff --git a/web/api/v1/api.go b/web/api/v1/api.go index e0a73fc772..a42da28b40 100644 --- a/web/api/v1/api.go +++ b/web/api/v1/api.go @@ -489,7 +489,7 @@ func (api *API) remoteRead(w http.ResponseWriter, r *http.Request) { })) } - if err := remote.EncodReadResponse(&resp, w); err != nil { + if err := remote.EncodeReadResponse(&resp, w); err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return }