Replace symbols in query args
commitb7c7f7667a9147d98e7ca0e3f1a2cf02b59983cc
authorKostiantyn Rybnikov <k-bx@k-bx.com>
dateTue 28 May 2019, 17:28 (7 years ago)
parent6380980
src/Servant/Elm/Internal/Generate.hs+3−1
@@ -327,7 +327,9 @@ elmCaptureArg segment =
327327elmQueryArg :: F.QueryArg EType -> Doc
328328elmQueryArg arg =
329329 "query_" <>
330− arg ^. F.queryArgName . F.argName . to (stext . F.unPathSegment)
330+ arg ^. F.queryArgName . F.argName . to (stext . replace . F.unPathSegment)
331+ where
332+ replace = T.replace "-" "_"
331333
332334
333335elmBodyArg :: Doc