retain output structure in response

pull/197/head
Rob Loranger 5 years ago
parent 26d906ae92
commit dae65b7d1f
No known key found for this signature in database
GPG Key ID: D6F1633A4F0903B8
  1. 8
      postrender.go

@ -258,5 +258,11 @@ func handleRenderMarkdown(app *App, w http.ResponseWriter, r *http.Request) erro
return ErrBadJSON return ErrBadJSON
} }
return impart.WriteSuccess(w, applyMarkdown([]byte(in.RawBody), in.BaseURL, app.cfg), http.StatusOK) out := struct {
Body string `json:"body"`
}{
Body: applyMarkdown([]byte(in.RawBody), in.BaseURL, app.cfg),
}
return impart.WriteSuccess(w, out, http.StatusOK)
} }

Loading…
Cancel
Save