diff options
Diffstat (limited to 'lambda-calcul/haskell/src/Minilang/API.hs')
| -rw-r--r-- | lambda-calcul/haskell/src/Minilang/API.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lambda-calcul/haskell/src/Minilang/API.hs b/lambda-calcul/haskell/src/Minilang/API.hs index fffee7f..8082ac8 100644 --- a/lambda-calcul/haskell/src/Minilang/API.hs +++ b/lambda-calcul/haskell/src/Minilang/API.hs @@ -22,6 +22,7 @@ import System.Random (StdGen, uniformList) type LambdaAPI = "api" :> "register" :> ReqBody '[JSON] User :> Verb 'POST 201 '[JSON] Token :<|> "api" :> "leaderboard" :> Get '[JSON] [Score] + :<|> "api" :> "score" :> QueryParam "token" Token :> Get '[JSON] Score :<|> "api" :> "challenge" :> QueryParam "token" Token :> Get '[JSON] Challenge :<|> "api" :> "challenge" :> QueryParam "token" Token :> ReqBody '[JSON] Text :> Post '[JSON] () :<|> Raw @@ -29,7 +30,8 @@ type LambdaAPI = data Score = Score { user :: User, grade :: Int, - lastTest :: Maybe UTCTime + lastTest :: Maybe UTCTime, + lastResult :: Maybe Bool } deriving (Eq, Show, Generic, ToJSON, FromJSON) |
