aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorFChannel <=>2021-01-28 15:29:49 -0800
committerFChannel <=>2021-01-28 15:29:49 -0800
commitcda2d90030a80731faa94977a13fcf09220e31ea (patch)
treee1ab9190853f45fb7ed83941b8611e046f11cc4e /main.go
parent7985199b37c4e497bb9b245613d3eeb09c98cadb (diff)
added reason to report db
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 3 insertions, 3 deletions
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")