1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-09-05 15:16:22 -07:00

Fix changes suggested by sqlclosecheck

This commit is contained in:
Eggbertx 2024-05-24 16:10:07 -07:00
parent 27a0142864
commit 1032042472
12 changed files with 87 additions and 27 deletions

View file

@ -425,10 +425,9 @@ func reportsCallback(_ http.ResponseWriter, request *http.Request, staff *gcsql.
dismissID := gcutil.HackyStringToInt(dismissIDstr)
block := request.FormValue("block")
if block != "" && staff.Rank != 3 {
errEv.
errEv.Caller().
Int("postID", dismissID).
Str("rejected", "not an admin").
Caller().Send()
Str("rejected", "not an admin").Send()
return "", errors.New("only the administrator can block reports")
}
found, err := gcsql.ClearReport(dismissID, staff.ID, block != "" && staff.Rank == 3)