Skip to content

Commit e3b7a7a

Browse files
authored
Merge pull request #326 from cotype/feature/sql_Fix
fix(core): fix sql in search route
2 parents f3955b4 + bc780e4 commit e3b7a7a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/persistence/adapter/knex/KnexContent.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -968,10 +968,10 @@ export default class KnexContent implements ContentAdapter {
968968
"content_revisions.data",
969969
...(!exact
970970
? ([
971-
this.knex.raw(
972-
`(case when text like '%${text}%' then 1 else 2 end) as isExact`
973-
)
974-
] as any)
971+
this.knex.raw(
972+
`(case when text like ? then 1 else 2 end) as isExact`
973+
,`%${text}%`)
974+
] as any)
975975
: [])
976976
]);
977977

0 commit comments

Comments
 (0)