Skip to content

Commit

Permalink
Suppress log when editing post or its metadata
Browse files Browse the repository at this point in the history
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
  • Loading branch information
thebaer committed Dec 1, 2019
1 parent 88a3ed7 commit d8f7758
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pad.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit d8f7758

Please sign in to comment.