Explorar el Código

fix: searching for links

poeti8 hace 5 años
padre
commit
36d4386e56
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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]
     );
   }