diff options
| author | Eugen Wissner <belka@caraus.de> | 2023-10-20 15:53:48 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2023-10-20 15:53:48 +0200 |
| commit | 3a6d17952b247682f1cb794ef27b26c9b007f00d (patch) | |
| tree | dfbfd7fe8ad4bba5084b6d5de7c9f97b010d5c51 /app/SlackBuilder/Updater.hs | |
| parent | 4105ffa91f85d66e631383211b5d074b04fc0d3c (diff) | |
| download | slackbuilder-3a6d17952b247682f1cb794ef27b26c9b007f00d.tar.gz | |
Allow looking on the text page for the latest version
Diffstat (limited to 'app/SlackBuilder/Updater.hs')
| -rw-r--r-- | app/SlackBuilder/Updater.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/SlackBuilder/Updater.hs b/app/SlackBuilder/Updater.hs index 864e466..1ebf7fe 100644 --- a/app/SlackBuilder/Updater.hs +++ b/app/SlackBuilder/Updater.hs @@ -107,11 +107,11 @@ latestPackagist PackagistArguments{..} = do >>= fmap (version . fst) . Vector.uncons latestText :: TextArguments -> SlackBuilderT (Maybe Text) -latestText (TextArguments textArguments) = do - uri <- liftIO $ useHttpsURI <$> mkURI textArguments +latestText TextArguments{..} = do + uri <- liftIO $ useHttpsURI <$> mkURI textURL packagistResponse <- traverse (runReq defaultHttpConfig . go . fst) uri - pure $ Text.strip . Text.Encoding.decodeASCII . responseBody + pure $ versionPicker . Text.Encoding.decodeUtf8 . responseBody <$> packagistResponse where go uri = req GET uri NoReqBody bsResponse mempty |
