Fix renderDownloadWithVersion concatenation order

This commit is contained in:
2023-09-22 07:47:46 +02:00
parent 840290491f
commit ec704e267b
3 changed files with 18 additions and 4 deletions

View File

@ -68,8 +68,8 @@ renderDownloadWithVersion :: MonadThrow m => DownloadTemplate -> Text -> m URI
renderDownloadWithVersion (DownloadTemplate components) version =
URI.mkURI $ foldr f "" components
where
f (StaticPlaceholder staticPlaceholder) accumulator = accumulator <> staticPlaceholder
f VersionPlaceholder accumulator = accumulator <> version
f (StaticPlaceholder staticPlaceholder) = (staticPlaceholder <>)
f VersionPlaceholder = (version <>)
-- | Function used to get the latest version of a source.
data Updater = Updater (SlackBuilderT (Maybe Text)) DownloadTemplate