Fix weird compilation error
This commit is contained in:
parent
648a4368d0
commit
d44408c1e8
@ -1,5 +1,3 @@
|
||||
{-# LANGUAGE OverloadedLists #-}
|
||||
|
||||
module Handler.ShowChallenge where
|
||||
|
||||
import Import hiding (Proxy, fromList)
|
||||
@ -66,7 +64,7 @@ import qualified Data.Swagger as DS
|
||||
|
||||
import Data.Swagger.Declare
|
||||
import Control.Lens hiding ((.=), (^.))
|
||||
import Data.Proxy
|
||||
import Data.Proxy as DPR
|
||||
import Data.HashMap.Strict.InsOrd (fromList)
|
||||
|
||||
instance ToJSON LeaderboardEntry where
|
||||
@ -82,8 +80,8 @@ instance ToJSON LeaderboardEntry where
|
||||
|
||||
instance ToSchema LeaderboardEntry where
|
||||
declareNamedSchema _ = do
|
||||
stringSchema <- declareSchemaRef (Proxy :: Proxy String)
|
||||
intSchema <- declareSchemaRef (Proxy :: Proxy Int)
|
||||
stringSchema <- declareSchemaRef (DPR.Proxy :: DPR.Proxy String)
|
||||
intSchema <- declareSchemaRef (DPR.Proxy :: DPR.Proxy Int)
|
||||
return $ NamedSchema (Just "LeaderboardEntry") $ mempty
|
||||
& type_ .~ SwaggerObject
|
||||
& properties .~
|
||||
@ -105,7 +103,7 @@ declareLeaderboardSwagger = do
|
||||
|
||||
return $ mempty
|
||||
& paths .~
|
||||
[ ("/api/leaderboard/{challengeName}",
|
||||
fromList [ ("/api/leaderboard/{challengeName}",
|
||||
mempty & DS.get ?~ (mempty
|
||||
& parameters .~ [ Inline $ mempty
|
||||
& name .~ "challengeName"
|
||||
|
Loading…
Reference in New Issue
Block a user