Skip to content
This repository has been archived by the owner on Jan 23, 2025. It is now read-only.

Commit

Permalink
update content type to json
Browse files Browse the repository at this point in the history
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
  • Loading branch information
ianmuchyri committed Mar 5, 2024
1 parent a751cfd commit 0146dd4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions ui/api/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -1307,8 +1307,9 @@ func FetchChartDataEndpoint(svc ui.Service) endpoint.Endpoint {
}

return uiRes{
code: http.StatusOK,
html: res,
code: http.StatusOK,
html: res,
headers: map[string]string{"Content-Type": jsonContentType},
}, nil
}
}
Expand Down
2 changes: 1 addition & 1 deletion ui/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -1836,7 +1836,7 @@ func (us *uiService) FetchChartData(token string, channelID string, mpgm sdk.Mes
return []byte{}, err
}

data, jsonErr := json.Marshal(msg.Messages)
data, jsonErr := json.Marshal(msg)
if jsonErr != nil {
return []byte{}, errors.Wrap(err, ErrExecTemplate)
}
Expand Down

0 comments on commit 0146dd4

Please sign in to comment.