Remove unneed expiry query from save function

This commit is contained in:
Eliot Whalan 2016-06-25 08:38:58 +10:00
parent 30f4ff1275
commit 985565b348

View File

@ -89,11 +89,10 @@ func save(raw string, lang string, title string, expiry string) []string {
check(err)
sha := hash(raw)
query, err := db.Query("select id, title, hash, data, delkey, expiry from pastebin")
query, err := db.Query("select id, title, hash, data, delkey from pastebin")
for query.Next() {
var id, title, hash, paste, delkey string
var expiry time.Time
err := query.Scan(&id, &title, &hash, &paste, &delkey, &expiry)
err := query.Scan(&id, &title, &hash, &paste, &delkey)
check(err)
if hash == sha {
url := ADDRESS + "/p/" + id