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:
parent
27a0142864
commit
1032042472
12 changed files with 87 additions and 27 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue