1
0
Fork 0
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:
Eggbertx 2022-04-24 17:26:56 -07:00
parent 6d1e95b307
commit 8e417c0640

View file

@ -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)