update golden test

This commit is contained in:
piq9117 2024-03-01 11:27:14 -05:00 committed by Alexander Biehl
parent 5e1e3ab704
commit efcc04057d
15 changed files with 75 additions and 75 deletions

View File

@ -278,13 +278,13 @@ requiredQueryParameter ::
requiredQueryParameter name withParam = \request respond -> requiredQueryParameter name withParam = \request respond ->
case List.lookup name (Wai.queryString request) of case List.lookup name (Wai.queryString request) of
Nothing -> Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just Nothing -> Just Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam x request respond withParam x request respond
{-# INLINEABLE requiredQueryParameter #-} {-# INLINEABLE requiredQueryParameter #-}
@ -304,11 +304,11 @@ optionalQueryParameter name allowEmpty withParam = \request respond ->
| allowEmpty -> | allowEmpty ->
withParam Nothing request respond withParam Nothing request respond
| otherwise -> | otherwise ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam (Just x) request respond withParam (Just x) request respond
{-# INLINEABLE optionalQueryParameter #-} {-# INLINEABLE optionalQueryParameter #-}

View File

@ -264,13 +264,13 @@ requiredQueryParameter ::
requiredQueryParameter name withParam = \request respond -> requiredQueryParameter name withParam = \request respond ->
case List.lookup name (Wai.queryString request) of case List.lookup name (Wai.queryString request) of
Nothing -> Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just Nothing -> Just Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam x request respond withParam x request respond
{-# INLINEABLE requiredQueryParameter #-} {-# INLINEABLE requiredQueryParameter #-}
@ -290,11 +290,11 @@ optionalQueryParameter name allowEmpty withParam = \request respond ->
| allowEmpty -> | allowEmpty ->
withParam Nothing request respond withParam Nothing request respond
| otherwise -> | otherwise ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam (Just x) request respond withParam (Just x) request respond
{-# INLINEABLE optionalQueryParameter #-} {-# INLINEABLE optionalQueryParameter #-}

View File

@ -264,13 +264,13 @@ requiredQueryParameter ::
requiredQueryParameter name withParam = \request respond -> requiredQueryParameter name withParam = \request respond ->
case List.lookup name (Wai.queryString request) of case List.lookup name (Wai.queryString request) of
Nothing -> Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just Nothing -> Just Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam x request respond withParam x request respond
{-# INLINEABLE requiredQueryParameter #-} {-# INLINEABLE requiredQueryParameter #-}
@ -290,11 +290,11 @@ optionalQueryParameter name allowEmpty withParam = \request respond ->
| allowEmpty -> | allowEmpty ->
withParam Nothing request respond withParam Nothing request respond
| otherwise -> | otherwise ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam (Just x) request respond withParam (Just x) request respond
{-# INLINEABLE optionalQueryParameter #-} {-# INLINEABLE optionalQueryParameter #-}

View File

@ -278,13 +278,13 @@ requiredQueryParameter ::
requiredQueryParameter name withParam = \request respond -> requiredQueryParameter name withParam = \request respond ->
case List.lookup name (Wai.queryString request) of case List.lookup name (Wai.queryString request) of
Nothing -> Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just Nothing -> Just Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam x request respond withParam x request respond
{-# INLINEABLE requiredQueryParameter #-} {-# INLINEABLE requiredQueryParameter #-}
@ -304,11 +304,11 @@ optionalQueryParameter name allowEmpty withParam = \request respond ->
| allowEmpty -> | allowEmpty ->
withParam Nothing request respond withParam Nothing request respond
| otherwise -> | otherwise ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam (Just x) request respond withParam (Just x) request respond
{-# INLINEABLE optionalQueryParameter #-} {-# INLINEABLE optionalQueryParameter #-}

View File

@ -264,13 +264,13 @@ requiredQueryParameter ::
requiredQueryParameter name withParam = \request respond -> requiredQueryParameter name withParam = \request respond ->
case List.lookup name (Wai.queryString request) of case List.lookup name (Wai.queryString request) of
Nothing -> Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just Nothing -> Just Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam x request respond withParam x request respond
{-# INLINEABLE requiredQueryParameter #-} {-# INLINEABLE requiredQueryParameter #-}
@ -290,11 +290,11 @@ optionalQueryParameter name allowEmpty withParam = \request respond ->
| allowEmpty -> | allowEmpty ->
withParam Nothing request respond withParam Nothing request respond
| otherwise -> | otherwise ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam (Just x) request respond withParam (Just x) request respond
{-# INLINEABLE optionalQueryParameter #-} {-# INLINEABLE optionalQueryParameter #-}

View File

@ -267,13 +267,13 @@ requiredQueryParameter ::
requiredQueryParameter name withParam = \request respond -> requiredQueryParameter name withParam = \request respond ->
case List.lookup name (Wai.queryString request) of case List.lookup name (Wai.queryString request) of
Nothing -> Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just Nothing -> Just Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam x request respond withParam x request respond
{-# INLINEABLE requiredQueryParameter #-} {-# INLINEABLE requiredQueryParameter #-}
@ -293,11 +293,11 @@ optionalQueryParameter name allowEmpty withParam = \request respond ->
| allowEmpty -> | allowEmpty ->
withParam Nothing request respond withParam Nothing request respond
| otherwise -> | otherwise ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam (Just x) request respond withParam (Just x) request respond
{-# INLINEABLE optionalQueryParameter #-} {-# INLINEABLE optionalQueryParameter #-}

View File

@ -331,13 +331,13 @@ requiredQueryParameter ::
requiredQueryParameter name withParam = \request respond -> requiredQueryParameter name withParam = \request respond ->
case List.lookup name (Wai.queryString request) of case List.lookup name (Wai.queryString request) of
Nothing -> Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just Nothing -> Just Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam x request respond withParam x request respond
{-# INLINEABLE requiredQueryParameter #-} {-# INLINEABLE requiredQueryParameter #-}
@ -357,11 +357,11 @@ optionalQueryParameter name allowEmpty withParam = \request respond ->
| allowEmpty -> | allowEmpty ->
withParam Nothing request respond withParam Nothing request respond
| otherwise -> | otherwise ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam (Just x) request respond withParam (Just x) request respond
{-# INLINEABLE optionalQueryParameter #-} {-# INLINEABLE optionalQueryParameter #-}

View File

@ -282,13 +282,13 @@ requiredQueryParameter ::
requiredQueryParameter name withParam = \request respond -> requiredQueryParameter name withParam = \request respond ->
case List.lookup name (Wai.queryString request) of case List.lookup name (Wai.queryString request) of
Nothing -> Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just Nothing -> Just Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam x request respond withParam x request respond
{-# INLINEABLE requiredQueryParameter #-} {-# INLINEABLE requiredQueryParameter #-}
@ -308,11 +308,11 @@ optionalQueryParameter name allowEmpty withParam = \request respond ->
| allowEmpty -> | allowEmpty ->
withParam Nothing request respond withParam Nothing request respond
| otherwise -> | otherwise ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam (Just x) request respond withParam (Just x) request respond
{-# INLINEABLE optionalQueryParameter #-} {-# INLINEABLE optionalQueryParameter #-}

View File

@ -295,13 +295,13 @@ requiredQueryParameter ::
requiredQueryParameter name withParam = \request respond -> requiredQueryParameter name withParam = \request respond ->
case List.lookup name (Wai.queryString request) of case List.lookup name (Wai.queryString request) of
Nothing -> Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just Nothing -> Just Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam x request respond withParam x request respond
{-# INLINEABLE requiredQueryParameter #-} {-# INLINEABLE requiredQueryParameter #-}
@ -321,11 +321,11 @@ optionalQueryParameter name allowEmpty withParam = \request respond ->
| allowEmpty -> | allowEmpty ->
withParam Nothing request respond withParam Nothing request respond
| otherwise -> | otherwise ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam (Just x) request respond withParam (Just x) request respond
{-# INLINEABLE optionalQueryParameter #-} {-# INLINEABLE optionalQueryParameter #-}

View File

@ -328,13 +328,13 @@ requiredQueryParameter ::
requiredQueryParameter name withParam = \request respond -> requiredQueryParameter name withParam = \request respond ->
case List.lookup name (Wai.queryString request) of case List.lookup name (Wai.queryString request) of
Nothing -> Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just Nothing -> Just Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam x request respond withParam x request respond
{-# INLINEABLE requiredQueryParameter #-} {-# INLINEABLE requiredQueryParameter #-}
@ -354,11 +354,11 @@ optionalQueryParameter name allowEmpty withParam = \request respond ->
| allowEmpty -> | allowEmpty ->
withParam Nothing request respond withParam Nothing request respond
| otherwise -> | otherwise ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam (Just x) request respond withParam (Just x) request respond
{-# INLINEABLE optionalQueryParameter #-} {-# INLINEABLE optionalQueryParameter #-}

View File

@ -264,13 +264,13 @@ requiredQueryParameter ::
requiredQueryParameter name withParam = \request respond -> requiredQueryParameter name withParam = \request respond ->
case List.lookup name (Wai.queryString request) of case List.lookup name (Wai.queryString request) of
Nothing -> Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just Nothing -> Just Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam x request respond withParam x request respond
{-# INLINEABLE requiredQueryParameter #-} {-# INLINEABLE requiredQueryParameter #-}
@ -290,11 +290,11 @@ optionalQueryParameter name allowEmpty withParam = \request respond ->
| allowEmpty -> | allowEmpty ->
withParam Nothing request respond withParam Nothing request respond
| otherwise -> | otherwise ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam (Just x) request respond withParam (Just x) request respond
{-# INLINEABLE optionalQueryParameter #-} {-# INLINEABLE optionalQueryParameter #-}

View File

@ -264,13 +264,13 @@ requiredQueryParameter ::
requiredQueryParameter name withParam = \request respond -> requiredQueryParameter name withParam = \request respond ->
case List.lookup name (Wai.queryString request) of case List.lookup name (Wai.queryString request) of
Nothing -> Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just Nothing -> Just Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam x request respond withParam x request respond
{-# INLINEABLE requiredQueryParameter #-} {-# INLINEABLE requiredQueryParameter #-}
@ -290,11 +290,11 @@ optionalQueryParameter name allowEmpty withParam = \request respond ->
| allowEmpty -> | allowEmpty ->
withParam Nothing request respond withParam Nothing request respond
| otherwise -> | otherwise ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam (Just x) request respond withParam (Just x) request respond
{-# INLINEABLE optionalQueryParameter #-} {-# INLINEABLE optionalQueryParameter #-}

View File

@ -294,13 +294,13 @@ requiredQueryParameter ::
requiredQueryParameter name withParam = \request respond -> requiredQueryParameter name withParam = \request respond ->
case List.lookup name (Wai.queryString request) of case List.lookup name (Wai.queryString request) of
Nothing -> Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just Nothing -> Just Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam x request respond withParam x request respond
{-# INLINEABLE requiredQueryParameter #-} {-# INLINEABLE requiredQueryParameter #-}
@ -320,11 +320,11 @@ optionalQueryParameter name allowEmpty withParam = \request respond ->
| allowEmpty -> | allowEmpty ->
withParam Nothing request respond withParam Nothing request respond
| otherwise -> | otherwise ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam (Just x) request respond withParam (Just x) request respond
{-# INLINEABLE optionalQueryParameter #-} {-# INLINEABLE optionalQueryParameter #-}

View File

@ -295,13 +295,13 @@ requiredQueryParameter ::
requiredQueryParameter name withParam = \request respond -> requiredQueryParameter name withParam = \request respond ->
case List.lookup name (Wai.queryString request) of case List.lookup name (Wai.queryString request) of
Nothing -> Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just Nothing -> Just Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam x request respond withParam x request respond
{-# INLINEABLE requiredQueryParameter #-} {-# INLINEABLE requiredQueryParameter #-}
@ -321,11 +321,11 @@ optionalQueryParameter name allowEmpty withParam = \request respond ->
| allowEmpty -> | allowEmpty ->
withParam Nothing request respond withParam Nothing request respond
| otherwise -> | otherwise ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam (Just x) request respond withParam (Just x) request respond
{-# INLINEABLE optionalQueryParameter #-} {-# INLINEABLE optionalQueryParameter #-}

View File

@ -298,13 +298,13 @@ requiredQueryParameter ::
requiredQueryParameter name withParam = \request respond -> requiredQueryParameter name withParam = \request respond ->
case List.lookup name (Wai.queryString request) of case List.lookup name (Wai.queryString request) of
Nothing -> Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just Nothing -> Just Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam x request respond withParam x request respond
{-# INLINEABLE requiredQueryParameter #-} {-# INLINEABLE requiredQueryParameter #-}
@ -324,11 +324,11 @@ optionalQueryParameter name allowEmpty withParam = \request respond ->
| allowEmpty -> | allowEmpty ->
withParam Nothing request respond withParam Nothing request respond
| otherwise -> | otherwise ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) -> Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of case parseQueryParam (Text.decodeUtf8 value) of
Left _err -> Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty) respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x -> Right x ->
withParam (Just x) request respond withParam (Just x) request respond
{-# INLINEABLE optionalQueryParameter #-} {-# INLINEABLE optionalQueryParameter #-}