From d8f77585f50917cd8597af448b145dec00e6d24c Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Sun, 1 Dec 2019 06:16:12 -0500 Subject: [PATCH] Suppress log when editing post or its metadata This adds the instance's Hostname to the collection data loaded when editing a collection post or its metadata. While not technically needed in this situation, it suppresses an alarming error log. Resolves #216 --- pad.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pad.go b/pad.go index 37d1c9b..3b0f1c2 100644 --- a/pad.go +++ b/pad.go @@ -92,6 +92,7 @@ func handleViewPad(app *App, w http.ResponseWriter, r *http.Request) error { if err != nil { return err } + appData.EditCollection.hostName = app.cfg.App.Host } else { // Editing a floating article appData.Post = getRawPost(app, action) @@ -161,6 +162,7 @@ func handleViewMeta(app *App, w http.ResponseWriter, r *http.Request) error { if err != nil { return err } + appData.EditCollection.hostName = app.cfg.App.Host } else { // Editing a floating article appData.Post = getRawPost(app, action)