fix: add % to LIKE query for search

This commit is contained in:
əlemi 2024-08-11 15:09:33 +02:00
parent 89b2b598f4
commit 253d757d9a
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -59,7 +59,7 @@ pub async fn search(
} }
filter = Condition::all() filter = Condition::all()
.add(upub::model::object::Column::Content.like(page.q)) .add(upub::model::object::Column::Content.like(format!("%{}%", page.q)))
.add(filter); .add(filter);
// TODO lmao rethink this all // TODO lmao rethink this all