aboutsummaryrefslogtreecommitdiff
path: root/client.go
diff options
context:
space:
mode:
authorFChannel <>2021-07-03 19:58:22 -0700
committerFChannel <>2021-07-03 19:58:22 -0700
commit68f3c361656ae343fd809239452a954424a0bcb2 (patch)
treedacd87de82acb57f6ac0c447b09ab57db0b23fad /client.go
parent068e6caf8dfa3fb36dd9f74b9070f41f801e9c8d (diff)
added report reason to admin manage page
Diffstat (limited to 'client.go')
-rw-r--r--client.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/client.go b/client.go
index f4575f5..8cb9004 100644
--- a/client.go
+++ b/client.go
@@ -68,6 +68,7 @@ type AdminPage struct {
type Report struct {
ID string
Count int
+ Reason string
}
type Removed struct {
@@ -484,7 +485,7 @@ func CreateLocalReportDB(db *sql.DB, id string, board string, reason string) {
func GetLocalReportDB(db *sql.DB, board string) []Report {
var reported []Report
- query := `select id, count from reported where board=$1`
+ query := `select id, count, reason from reported where board=$1`
rows, err := db.Query(query, board)
@@ -495,7 +496,7 @@ func GetLocalReportDB(db *sql.DB, board string) []Report {
for rows.Next() {
var r Report
- rows.Scan(&r.ID, &r.Count)
+ rows.Scan(&r.ID, &r.Count, &r.Reason)
reported = append(reported, r)
}