From b1a6466c9364439ed7494fd7a55f6d8b99880267 Mon Sep 17 00:00:00 2001 From: defanor Date: Tue, 29 Oct 2019 07:11:40 +0300 Subject: Allow destination search by room ID --- DWProxy.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DWProxy.hs b/DWProxy.hs index 5ff3cf7..10776c9 100644 --- a/DWProxy.hs +++ b/DWProxy.hs @@ -203,8 +203,8 @@ c2s c leftover = do "select * from rooms where room_short like ? or room_id = ?" ((T.concat ["%", f', "%"]), f') toRooms <- SQLite.query (dbConn c) - "select * from rooms where room_short like ?" - (SQLite.Only (concat ["%", t, "%"])) + "select * from rooms where room_short like ? or room_id = ?" + ((concat ["%", t, "%"]), t) let routes = sortOn (\(_, _, p) -> length p) $ rights [ (\p -> (showRoom from, showRoom to, p)) <$> findPath (cPF c) (roomID from) (roomID to) -- cgit v1.2.3