We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cace53f commit 4f251dcCopy full SHA for 4f251dc
server/src/services/feed.ts
@@ -324,12 +324,12 @@ export function FeedService() {
324
}
325
const cacheKey = `search_${keyword}`;
326
const searchKeyword = `%${keyword}%`;
327
- const where = or(like(feeds.title, searchKeyword),
+ const whereClause = or(like(feeds.title, searchKeyword),
328
like(feeds.content, searchKeyword),
329
like(feeds.summary, searchKeyword),
330
like(feeds.alias, searchKeyword));
331
const feed_list = (await cache.getOrSet(cacheKey, () => db.query.feeds.findMany({
332
- where: admin ? where : and(where, eq(feeds.draft, 0)),
+ where: admin ? whereClause : and(whereClause, eq(feeds.draft, 0)),
333
columns: admin ? undefined : {
334
draft: false,
335
listed: false
0 commit comments