|
1 |
| -import { and, count, desc, eq, like, or } from "drizzle-orm"; |
2 |
| -import Elysia, { t } from "elysia"; |
3 |
| -import { XMLParser } from "fast-xml-parser"; |
| 1 | +import {and, count, desc, eq, like, or} from "drizzle-orm"; |
| 2 | +import Elysia, {t} from "elysia"; |
| 3 | +import {XMLParser} from "fast-xml-parser"; |
4 | 4 | import html2md from 'html-to-md';
|
5 |
| -import type { DB } from "../_worker"; |
6 |
| -import { feeds, visits } from "../db/schema"; |
7 |
| -import { setup } from "../setup"; |
8 |
| -import { ClientConfig, PublicCache } from "../utils/cache"; |
9 |
| -import { getDB } from "../utils/di"; |
10 |
| -import { extractImage } from "../utils/image"; |
11 |
| -import { bindTagToPost } from "./tag"; |
| 5 | +import type {DB} from "../_worker"; |
| 6 | +import {feeds, visits} from "../db/schema"; |
| 7 | +import {setup} from "../setup"; |
| 8 | +import {ClientConfig, PublicCache} from "../utils/cache"; |
| 9 | +import {getDB} from "../utils/di"; |
| 10 | +import {extractImage} from "../utils/image"; |
| 11 | +import {bindTagToPost} from "./tag"; |
12 | 12 |
|
13 | 13 | export function FeedService() {
|
14 | 14 | const db: DB = getDB();
|
@@ -326,8 +326,7 @@ export function FeedService() {
|
326 | 326 | const searchKeyword = `%${keyword}%`;
|
327 | 327 | const where = or(like(feeds.title, searchKeyword),
|
328 | 328 | like(feeds.content, searchKeyword),
|
329 |
| - like(feeds.summary, searchKeyword), |
330 |
| - like(feeds.alias, searchKeyword)); |
| 329 | + like(feeds.summary, searchKeyword)); |
331 | 330 | const feed_list = (await cache.getOrSet(cacheKey, () => db.query.feeds.findMany({
|
332 | 331 | where: admin ? where : and(where, eq(feeds.draft, 0)),
|
333 | 332 | columns: admin ? undefined : {
|
|
0 commit comments