diff --git a/server/src/services/feed.ts b/server/src/services/feed.ts index 031a939b..91f0b9e2 100644 --- a/server/src/services/feed.ts +++ b/server/src/services/feed.ts @@ -324,12 +324,12 @@ export function FeedService() { } const cacheKey = `search_${keyword}`; const searchKeyword = `%${keyword}%`; - const where = or(like(feeds.title, searchKeyword), + const whereClause = or(like(feeds.title, searchKeyword), like(feeds.content, searchKeyword), like(feeds.summary, searchKeyword), like(feeds.alias, searchKeyword)); const feed_list = (await cache.getOrSet(cacheKey, () => db.query.feeds.findMany({ - where: admin ? where : and(where, eq(feeds.draft, 0)), + where: admin ? whereClause : and(whereClause, eq(feeds.draft, 0)), columns: admin ? undefined : { draft: false, listed: false