default to level=0 if tag not present

seems to give slightly better results
This commit is contained in:
stuebinm 2023-11-14 23:50:38 +01:00
parent 8ae435ab77
commit b33c00f1c3

View file

@ -166,7 +166,7 @@ app AppData{..} request respond = mkAnswer >>= (respond . toResponse)
Left _ -> pure Notfound
Right (platforms :: Vector Platform) -> do
let answer = V.toList platforms
& sortOn (maybe (-100 :: Int) (fromRight (-100) . fmap fst . T.signed T.decimal) . osmLevel)
& sortOn (maybe (0::Int) (fromRight 0 . fmap fst . T.signed T.decimal) . osmLevel)
<&> renderPlatform
& (Html . T.concat)
now <- getCurrentTime