mirror of
https://github.com/juherr/kill-the-news.git
synced 2026-06-21 06:13:48 +00:00
7bf0f71f86
Replace the history-driven lib/ + utils/ split with DDD layers: - domain/: aggregate, repositories, value objects, pure parsers/format - application/: feed-service, email-processor, feed-fetcher, stats - infrastructure/: logging, auth, KV/R2 adapters, HTTP, framework glue Pure file relocation; imports updated mechanically. Behaviour unchanged. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
10 lines
406 B
TypeScript
10 lines
406 B
TypeScript
import { Env } from "../types";
|
|
|
|
// Returns the attachment bucket only when the feature is enabled, so callers can
|
|
// narrow cleanly. Attachments are on whenever R2 is bound, unless explicitly
|
|
// turned off with ATTACHMENTS_ENABLED="false".
|
|
export function getAttachmentBucket(env: Env): R2Bucket | undefined {
|
|
if (env.ATTACHMENTS_ENABLED === "false") return undefined;
|
|
return env.ATTACHMENT_BUCKET;
|
|
}
|