API: Add note about leaking blobs on delete

We can address this later, it's not really a big deal.
This commit is contained in:
Drew DeVault 2021-09-21 14:53:11 +02:00
parent 48e2e8e288
commit df35add13b
1 changed files with 1 additions and 0 deletions

View File

@ -208,6 +208,7 @@ func (r *mutationResolver) Delete(ctx context.Context, id string) (*model.Paste,
var paste model.Paste
if err := database.WithTx(ctx, nil, func(tx *sql.Tx) error {
// TODO: This can leak blobs
row := tx.QueryRowContext(ctx, `
DELETE FROM paste
WHERE sha = $1 AND user_id = $2