From cda2d90030a80731faa94977a13fcf09220e31ea Mon Sep 17 00:00:00 2001 From: FChannel <=> Date: Thu, 28 Jan 2021 15:29:49 -0800 Subject: added reason to report db --- main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 0ff2854..e03bae6 100644 --- a/main.go +++ b/main.go @@ -287,7 +287,7 @@ func main() { return } - if(len(r.FormValue("subject")) > 100 || len(r.FormValue("name")) > 100 || len(r.FormValue("options" > 100) { + if(len(r.FormValue("subject")) > 100 || len(r.FormValue("name")) > 100 || len(r.FormValue("options")) > 100) { w.Write([]byte("Name, Subject or Options limit 100 characters")) return } @@ -1539,9 +1539,9 @@ func ReportActivity(db *sql.DB, id string, reason string) bool { } if count < 1 { - query = `insert into reported (id, count, board) values ($1, $2, $3)` + query = `insert into reported (id, count, board, reason) values ($1, $2, $3, $4)` - _, err := db.Exec(query, id, 1, actor.Actor.Id) + _, err := db.Exec(query, id, 1, actor.Actor.Id, reason) if err != nil { CheckError(err, "error inserting new reported activity") -- cgit v1.2.3