mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-09-06 11:46:24 -07:00
Have returned JSON error show the given boardid
This commit is contained in:
parent
6d1e95b307
commit
8e417c0640
1 changed files with 3 additions and 4 deletions
|
@ -348,15 +348,14 @@ func utilHandler(writer http.ResponseWriter, request *http.Request) {
|
|||
gclog.Printf(gclog.LErrorLog, "Invalid board ID in deletion request")
|
||||
if wantsJSON {
|
||||
serverutil.ServeJSON(writer, map[string]interface{}{
|
||||
"error": err,
|
||||
"boardid": post.BoardID,
|
||||
"error": "invalid boardid string",
|
||||
"boardid": boardid,
|
||||
})
|
||||
return
|
||||
} else {
|
||||
serverutil.ServeErrorPage(writer,
|
||||
fmt.Sprintf("Invalid boardid '%s' in request (got error '%s')", boardid, err))
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
post, err = gcsql.GetSpecificPost(post.ID, true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue