Correct return list

This commit is contained in:
Eliot Whalan 2016-06-19 16:49:22 +10:00
parent 05c3600bd8
commit f7b2f47038
1 changed files with 2 additions and 1 deletions

View File

@ -81,11 +81,12 @@ func save(raw []byte) []string {
sha := hash(p)
query, err := db.Query("select id, hash, data, delkey from pastebin")
for query.Next() {
url := ADDRESS + "/p/" + id
var id, hash, paste, delkey string
err := query.Scan(&id, &hash, &paste, &delkey)
check(err)
if hash == sha {
return []string{id, hash, paste, delkey}
return []string{id, hash, url paste, delkey}
}
}
id := generateName()