From 0f456d4e47c575acbbe234a4580083420e56a5bb Mon Sep 17 00:00:00 2001 From: aiooss-anssi Date: Tue, 9 Jul 2024 10:48:37 +0200 Subject: [PATCH] webapp: add asterisks to glob search --- webapp/main.py | 2 +- webapp/templates/index.html.jinja2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/main.py b/webapp/main.py index 6c636a6..e813f4a 100644 --- a/webapp/main.py +++ b/webapp/main.py @@ -70,7 +70,7 @@ async def api_flow_list(request): if search: cursor = await payload_database.execute( "SELECT flow_id FROM raw WHERE blob GLOB ?1", - (search,), + (f"*{search}*",), ) rows = await cursor.fetchall() search_fid = [r["flow_id"] for r in rows] diff --git a/webapp/templates/index.html.jinja2 b/webapp/templates/index.html.jinja2 index e0a5cd4..e35cd7b 100644 --- a/webapp/templates/index.html.jinja2 +++ b/webapp/templates/index.html.jinja2 @@ -83,7 +83,7 @@ Search - +