From 891c9645abef9a8d7179bafcc2ba6fab743de83e Mon Sep 17 00:00:00 2001 From: Filip Gralinski Date: Thu, 2 Sep 2021 21:13:21 +0200 Subject: [PATCH] Fix swagger documentation for version-info --- Handler/ListChallenges.hs | 2 +- PersistSHA1.hs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Handler/ListChallenges.hs b/Handler/ListChallenges.hs index b93f6da..d584e7c 100644 --- a/Handler/ListChallenges.hs +++ b/Handler/ListChallenges.hs @@ -101,7 +101,7 @@ declareVersionInfoSwagger = do return $ mempty & paths .~ - [ ("/api/version-info/{challengeName}", + [ ("/api/version-info/{versionHash}", mempty & get ?~ (mempty & parameters .~ [ Inline $ mempty & name .~ "versionHash" diff --git a/PersistSHA1.hs b/PersistSHA1.hs index 8cd4740..2eca021 100644 --- a/PersistSHA1.hs +++ b/PersistSHA1.hs @@ -55,6 +55,7 @@ hexNibbleToWord8 'E' = 14 hexNibbleToWord8 'e' = 14 hexNibbleToWord8 'F' = 15 hexNibbleToWord8 'f' = 15 +hexNibbleToWord8 c = error ("Unexpected char '" ++ [c] ++ "'") instance PersistField SHA1 where toPersistValue (SHA1 t) = PersistByteString t