diff options
Diffstat (limited to 'server/Handlers.hs')
| -rw-r--r-- | server/Handlers.hs | 8 | 
1 files changed, 5 insertions, 3 deletions
diff --git a/server/Handlers.hs b/server/Handlers.hs index 719b475..93a7ae2 100644 --- a/server/Handlers.hs +++ b/server/Handlers.hs @@ -10,7 +10,7 @@ module Handlers (                  -- , relintImpl                  , stateImpl                  , AdminOverview(..) -                ,MapService(..)) where +                , MapService(..)) where  import           Universum @@ -24,7 +24,8 @@ import qualified Data.Map       as M  import           Servant        (Handler, err404, throwError)  import           Server         (JobStatus (..), Org (orgUrl),                                   RemoteRef (RemoteRef, reponame), ServerState, -                                 Sha1, getJobStatus, unState) +                                 Sha1, adjustedPath, getJobStatus, unState) +  -- | an info type wrapped around the server state, to carry serialisation instances.  newtype AdminOverview = @@ -54,7 +55,8 @@ instance ToJSON MapService where            _ -> Nothing          mapInfo rev mappath MapResult { .. } = A.object                  [ "badges" .= mapresultBadges -                , "url" .= (orgUrl org <> rev <> "/" <> toText mappath) ] +                -- TODO: type-safe url library for adding the slash? +                , "url" .= (orgUrl org <> adjustedPath rev org <> "/" <> toText mappath) ]  | 
