Fix deletion function

This commit is contained in:
Eliot Whalan 2016-06-23 13:58:15 +10:00
parent 9a7c9bfc6e
commit 4e6b1b6c96
No known key found for this signature in database
GPG Key ID: C0A42175139840D6
1 changed files with 2 additions and 2 deletions

View File

@ -112,10 +112,10 @@ func delHandler(w http.ResponseWriter, r *http.Request) {
db, err := sql.Open("mysql", DATABASE) db, err := sql.Open("mysql", DATABASE)
check(err) check(err)
stmt, err := db.Prepare("delete from pastebin where delkey=? id=?") stmt, err := db.Prepare("delete from pastebin where delkey=?")
check(err) check(err)
res, err := stmt.Exec(html.EscapeString(delkey), html.EscapeString(paste)) res, err := stmt.Exec(html.EscapeString(delkey))
check(err) check(err)
affect, err := res.RowsAffected() affect, err := res.RowsAffected()