Skip to content

Commit

Permalink
Fix new log viewer config response underlying struct
Browse files Browse the repository at this point in the history
Co-authored-by: Alirie Gray <[email protected]>
  • Loading branch information
jaredscheib and AlirieGray committed Jul 10, 2018
1 parent a9af861 commit 92bda81
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/org_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ type logViewerConfigResponse struct {
chronograf.LogViewerConfig
}

func newLogViewerConfigResponse(config chronograf.OrganizationConfig) *logViewerConfigResponse {
func newLogViewerConfigResponse(lv chronograf.LogViewerConfig) *logViewerConfigResponse {
return &logViewerConfigResponse{
Links: selfLinks{
Self: "/chronograf/v1/org_config/logviewer",
},
LogViewerConfig: config.LogViewer,
LogViewerConfig: lv,
}
}

Expand Down Expand Up @@ -82,7 +82,7 @@ func (s *Service) LogViewerOrganizationConfig(w http.ResponseWriter, r *http.Req
return
}

res := newLogViewerConfigResponse(*config)
res := newLogViewerConfigResponse(config.LogViewer)

encodeJSON(w, http.StatusOK, res, s.Logger)
}
Expand Down Expand Up @@ -118,7 +118,7 @@ func (s *Service) ReplaceLogViewerOrganizationConfig(w http.ResponseWriter, r *h
}
config.LogViewer = logViewerConfig

res := newLogViewerConfigResponse(*config)
res := newLogViewerConfigResponse(config.LogViewer)
if err := s.Store.OrganizationConfig(ctx).Update(ctx, config); err != nil {
unknownErrorWithMessage(w, err, s.Logger)
return
Expand Down

0 comments on commit 92bda81

Please sign in to comment.