mirror of
https://github.com/writefreely/writefreely
synced 2024-11-10 11:24:13 +00:00
Suppress "user not found" log when post not found
This also saves a user suspension check when a post isn't found.
This commit is contained in:
parent
44a6703742
commit
cfea887b78
1 changed files with 6 additions and 3 deletions
5
posts.go
5
posts.go
|
@ -381,10 +381,13 @@ func handleViewPost(app *App, w http.ResponseWriter, r *http.Request) error {
|
|||
}
|
||||
}
|
||||
|
||||
suspended, err := app.db.IsUserSuspended(ownerID.Int64)
|
||||
var suspended bool
|
||||
if found {
|
||||
suspended, err = app.db.IsUserSuspended(ownerID.Int64)
|
||||
if err != nil {
|
||||
log.Error("view post: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
// Check if post has been unpublished
|
||||
if content == "" {
|
||||
|
|
Loading…
Reference in a new issue