mirror of
https://github.com/aljazceru/njump.git
synced 2026-02-02 12:44:36 +01:00
bring back pretty JSON.
This commit is contained in:
@@ -307,6 +307,9 @@ func render(w http.ResponseWriter, r *http.Request) {
|
||||
content = renderInlineMentions(basicFormatting(html.EscapeString(content)))
|
||||
}
|
||||
|
||||
// pretty JSON
|
||||
eventJSON, _ := json.MarshalIndent(event, "", " ")
|
||||
|
||||
params := map[string]any{
|
||||
"createdAt": createdAt,
|
||||
"modifiedAt": modifiedAt,
|
||||
@@ -323,6 +326,7 @@ func render(w http.ResponseWriter, r *http.Request) {
|
||||
"subject": subject,
|
||||
"description": description,
|
||||
"event": event,
|
||||
"eventJSON": string(eventJSON),
|
||||
"content": content,
|
||||
"titleizedContent": titleize(content),
|
||||
"textImageURL": textImageURL,
|
||||
|
||||
@@ -18,5 +18,5 @@
|
||||
|
||||
<div class="field {{if not ( or (eq .type "other") (eq .type "address"))}}advanced{{end}} boxed">
|
||||
<div class="label">Event JSON</div>
|
||||
<div class="json">{{.event}}</div>
|
||||
<div class="json">{{.eventJSON}}</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user