From 253d757d9a8140e1cabc127b9060a1fa0c603479 Mon Sep 17 00:00:00 2001 From: alemi Date: Sun, 11 Aug 2024 15:09:33 +0200 Subject: [PATCH] fix: add % to LIKE query for search --- upub/routes/src/activitypub/application.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upub/routes/src/activitypub/application.rs b/upub/routes/src/activitypub/application.rs index b20ae19..2984bca 100644 --- a/upub/routes/src/activitypub/application.rs +++ b/upub/routes/src/activitypub/application.rs @@ -59,7 +59,7 @@ pub async fn search( } filter = Condition::all() - .add(upub::model::object::Column::Content.like(page.q)) + .add(upub::model::object::Column::Content.like(format!("%{}%", page.q))) .add(filter); // TODO lmao rethink this all