refactor: simplify to single RELAYS constant (DRY)

This commit is contained in:
Gigi
2025-10-05 23:41:27 +01:00
parent 6e2f1102f7
commit 8b023af6a0
6 changed files with 22 additions and 73 deletions

View File

@@ -9,7 +9,7 @@ import {
getArticlePublished,
getArticleSummary
} from 'applesauce-core/helpers'
import { ARTICLE_RELAYS } from '../config/relays'
import { RELAYS } from '../config/relays'
export interface ArticleContent {
title: string
@@ -99,7 +99,7 @@ export async function fetchArticleByNaddr(
// Define relays to query - prefer relays from naddr, fallback to configured relays (including local)
const relays = pointer.relays && pointer.relays.length > 0
? pointer.relays
: ARTICLE_RELAYS
: RELAYS
// Fetch the article event
const filter = {