Build post chat and attachment workflows
All checks were successful
CI / backend (push) Successful in 13m8s
CI / frontend (push) Successful in 10m46s
CI / docker (push) Successful in 2m59s

This commit is contained in:
Cauê Faleiros
2026-06-08 16:44:33 -03:00
parent 8c7e5fbbe4
commit 0b920da187
30 changed files with 3021 additions and 204 deletions

View File

@@ -137,6 +137,26 @@ func (s Store) FindAttachment(ctx context.Context, id string, viewerUserID strin
return scanAttachment(row)
}
func (s Store) DeleteAttachment(ctx context.Context, id string) (Attachment, error) {
row := s.db.QueryRow(ctx, `
DELETE FROM calendar_item_attachments
WHERE id = $1::uuid
RETURNING
id::text,
calendar_item_id::text,
original_filename,
stored_filename,
mime_type,
size_bytes,
storage_driver,
storage_path,
created_by::text,
created_at
`, id)
return scanAttachment(row)
}
type attachmentScanner interface {
Scan(dest ...any) error
}