浏览代码

fix: searching for links

poeti8 5 年之前
父节点
当前提交
36d4386e56
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      server/queries/link.ts

+ 1 - 1
server/queries/link.ts

@@ -80,7 +80,7 @@ export const get = async (match: Partial<Link>, params: GetParams) => {
 
   if (params.search) {
     query.andWhereRaw(
-      "links.description || ' '  || links.address || ' ' || target ILIKE '%' || ? || '%'",
+      "concat_ws(' ', description, links.address, target) ILIKE '%' || ? || '%'",
       [params.search]
     );
   }