mirror of
https://github.com/writefreely/writefreely
synced 2024-11-24 17:43:05 +00:00
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
This commit is contained in:
parent
88a3ed7878
commit
d8f77585f5
1 changed files with 2 additions and 0 deletions
2
pad.go
2
pad.go
|
@ -92,6 +92,7 @@ func handleViewPad(app *App, w http.ResponseWriter, r *http.Request) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
appData.EditCollection.hostName = app.cfg.App.Host
|
||||||
} else {
|
} else {
|
||||||
// Editing a floating article
|
// Editing a floating article
|
||||||
appData.Post = getRawPost(app, action)
|
appData.Post = getRawPost(app, action)
|
||||||
|
@ -161,6 +162,7 @@ func handleViewMeta(app *App, w http.ResponseWriter, r *http.Request) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
appData.EditCollection.hostName = app.cfg.App.Host
|
||||||
} else {
|
} else {
|
||||||
// Editing a floating article
|
// Editing a floating article
|
||||||
appData.Post = getRawPost(app, action)
|
appData.Post = getRawPost(app, action)
|
||||||
|
|
Loading…
Reference in a new issue