refactor: implement s3 storage

This commit is contained in:
Steven
2024-05-02 21:28:06 +08:00
parent 355ea352aa
commit 26545c855c
55 changed files with 842 additions and 858 deletions

View File

@ -2,7 +2,6 @@ package postgres
import (
"context"
"database/sql"
"strings"
"github.com/pkg/errors"
@ -133,13 +132,3 @@ func (d *DB) DeleteInbox(ctx context.Context, delete *store.DeleteInbox) error {
}
return nil
}
func vacuumInbox(ctx context.Context, tx *sql.Tx) error {
stmt := `DELETE FROM inbox WHERE sender_id NOT IN (SELECT id FROM "user")`
_, err := tx.ExecContext(ctx, stmt)
if err != nil {
return err
}
return nil
}