Remove unneed expiry query from save function

This commit is contained in:
Eliot Whalan 2016-06-25 08:38:58 +10:00
parent 252c2a7fbe
commit a3f316962d
No known key found for this signature in database
GPG Key ID: C0A42175139840D6
1 changed files with 2 additions and 3 deletions

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