Fix cleanup SQL query

This commit is contained in:
Lukas Schulte Pelkum 2022-01-30 21:53:36 +01:00
parent f371f4e043
commit 317d7e6d88
No known key found for this signature in database
GPG Key ID: 408DA7CA81DB885C
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ func (driver *PostgresDriver) Delete(id string) error {
// Cleanup cleans up the expired pastes
func (driver *PostgresDriver) Cleanup() (int, error) {
query := "DELETE FROM pastes WHERE created < $2"
query := "DELETE FROM pastes WHERE created < $1"
tag, err := driver.pool.Exec(context.Background(), query, time.Now().Add(-config.Current.AutoDelete.Lifetime).Unix())
if err != nil {