Remove unneed expiry query from save function
This commit is contained in:
parent
252c2a7fbe
commit
a3f316962d
5
main.go
5
main.go
|
@ -89,11 +89,10 @@ func save(raw string, lang string, title string, expiry string) []string {
|
||||||
check(err)
|
check(err)
|
||||||
|
|
||||||
sha := hash(raw)
|
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() {
|
for query.Next() {
|
||||||
var id, title, hash, paste, delkey string
|
var id, title, hash, paste, delkey string
|
||||||
var expiry time.Time
|
err := query.Scan(&id, &title, &hash, &paste, &delkey)
|
||||||
err := query.Scan(&id, &title, &hash, &paste, &delkey, &expiry)
|
|
||||||
check(err)
|
check(err)
|
||||||
if hash == sha {
|
if hash == sha {
|
||||||
url := ADDRESS + "/p/" + id
|
url := ADDRESS + "/p/" + id
|
||||||
|
|
Loading…
Reference in New Issue