summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2019-10-29 07:11:40 +0300
committerdefanor <defanor@uberspace.net>2019-10-29 07:11:40 +0300
commitb1a6466c9364439ed7494fd7a55f6d8b99880267 (patch)
tree5100fed0043803979a0e1f538edea8b29f1039b5
parent62586fc58a06c025419f912bf31532283b022104 (diff)
Allow destination search by room ID
-rw-r--r--DWProxy.hs4
1 files 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)