From 449c59015e2ceec1a53245865e028eef03964e64 Mon Sep 17 00:00:00 2001 From: Gigi Date: Thu, 16 Oct 2025 23:20:57 +0200 Subject: [PATCH] refactor(api): import RELAYS from central config to keep DRY - Remove duplicated relay array from api/article-og.ts - Import from src/config/relays.ts instead --- api/article-og.ts | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/api/article-og.ts b/api/article-og.ts index 3e0f081b..891129c5 100644 --- a/api/article-og.ts +++ b/api/article-og.ts @@ -4,22 +4,11 @@ import { nip19 } from 'nostr-tools' import { AddressPointer } from 'nostr-tools/nip19' import { NostrEvent, Filter } from 'nostr-tools' import { Helpers } from 'applesauce-core' +import { RELAYS } from '../src/config/relays' const { getArticleTitle, getArticleImage, getArticleSummary } = Helpers -// Relay configuration (from src/config/relays.ts) -const RELAYS = [ - 'wss://relay.damus.io', - 'wss://nos.lol', - 'wss://relay.nostr.band', - 'wss://relay.dergigi.com', - 'wss://wot.dergigi.com', - 'wss://relay.snort.social', - 'wss://relay.current.fyi', - 'wss://nostr-pub.wellorder.net', - 'wss://purplepag.es', - 'wss://relay.primal.net' -] +// Use centralized relay configuration type CacheEntry = { html: string