chore: changes to salty service

This commit is contained in:
Jon Lundy
2022-10-25 16:07:46 -06:00
parent e118d06985
commit 7ae2a8ad25
10 changed files with 74 additions and 125 deletions

View File

@@ -127,10 +127,13 @@ func (s *service) getPending(w http.ResponseWriter, r *http.Request, uuid string
}
span.AddEvent(negotiated.String())
switch negotiated.String() {
mime := negotiated.String()
switch mime {
case "text/environment":
w.Header().Set("content-type", negotiated.String())
_, err = encodeTo(w, info.MarshalEnviron, req.MarshalEnviron)
case "application/json":
w.Header().Set("content-type", negotiated.String())
var out interface{} = info
if req != nil {
out = struct {