mirror of
https://github.com/writefreely/writefreely
synced 2025-02-17 16:28:23 +00:00
retain output structure in response
This commit is contained in:
parent
26d906ae92
commit
dae65b7d1f
1 changed files with 7 additions and 1 deletions
|
@ -258,5 +258,11 @@ func handleRenderMarkdown(app *App, w http.ResponseWriter, r *http.Request) erro
|
|||
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…
Add table
Reference in a new issue