Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use MultiVerb #824

Merged
merged 2 commits into from
Feb 19, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Use latest servant commit
tchoutri committed Feb 19, 2025
commit aa6cd888810619f62579f7d5ed9a13b4e3ee5a54
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
@@ -61,7 +61,7 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/haskell-servant/servant
tag: 831423ead6e2f0ed0d04d5b21cd61f2e0994a18d
tag: 527e99e78952717b1b2cc50c8059dbece6dc979f
subdir:
./servant
./servant-server
6 changes: 1 addition & 5 deletions src/web/FloraWeb/Pages/Routes/Sessions.hs
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
module FloraWeb.Pages.Routes.Sessions where

import Data.Text
import Generics.SOP (I (..), NP (..), NS (..))
import Generics.SOP (I (..), NS (..))
import Lucid
import Servant.API
import Servant.API.ContentTypes.Lucid
@@ -47,10 +47,6 @@ instance AsUnion NewSessionResponses NewSessionResult where
fromUnion (S (Z (I response))) = AuthenticationRequired response
fromUnion (S (S x)) = case x of {}

instance AsHeaders '[Text, SetCookie] () (Text, SetCookie) where
toHeaders (location, cookie) = (I location :* I cookie :* Nil, ())
fromHeaders (I location :* I cookie :* Nil, ()) = (location, cookie)

type CreateSession =
"new"
:> ReqBody '[FormUrlEncoded] LoginForm

Unchanged files with check annotations Beta

-> Eff es ()
importFromIndex user repositoryName index = do
entries <- Tar.read . GZip.decompress <$> liftIO (BL.readFile index)
let Right repositoryPackages = buildPackageListFromArchive entries

Check warning on line 106 in src/core/Flora/Import/Package/Bulk.hs

GitHub Actions / Backend_tests (9.6.6, ubuntu-22.04)

Pattern match(es) are non-exhaustive
Log.logInfo "packages" $
object
[ "repository" .= repositoryName
components = fmap display releaseComponents
in PackageDTO{..}
$(deriveJSON defaultOptions{fieldLabelModifier = camelTo2 '_'} ''PackageDTO)

Check warning on line 73 in src/web/FloraWeb/API/Routes/Packages/Types.hs

GitHub Actions / Backend_tests (9.6.6, ubuntu-22.04)

The record update defaultOptions
instance KnownNat i => ToSchema (PackageDTO i) where
declareNamedSchema proxy =
}
mkURL :: SearchAction -> Positive Word -> Text
mkURL ListAllPackages pageNumber =

Check warning on line 46 in src/web/FloraWeb/Components/PaginationNav.hs

GitHub Actions / Backend_tests (9.6.6, ubuntu-22.04)

Pattern match(es) are non-exhaustive
"/" <> toUrlPiece (Links.packageIndexLink pageNumber)
mkURL (ListAllPackagesInNamespace namespace) pageNumber =
Links.namespacePage namespace pageNumber
mkURL (DependentsOf namespace packageName mbSearchString) pageNumber =
case mbSearchString of
Nothing -> Links.dependentsPage namespace packageName pageNumber
Just searchString -> Links.dependentsPage namespace packageName pageNumber <> "q=" <> toUrlPiece mbSearchString

Check warning on line 55 in src/web/FloraWeb/Components/PaginationNav.hs

GitHub Actions / Backend_tests (9.6.6, ubuntu-22.04)

Defined but not used: ‘searchString’
mkURL (SearchExecutable searchString) pageNumber =
"/" <> toUrlPiece (Links.packageWithExecutable pageNumber searchString)
mkURL (SearchInAdvisories searchString) pageNumber =
showAll :: Target -> Maybe Version -> Namespace -> PackageName -> FloraHTML
showAll target mVersion namespace packageName = do
let resource = case target of

Check warning on line 387 in src/web/FloraWeb/Pages/Templates/Packages.hs

GitHub Actions / Backend_tests (9.6.6, ubuntu-22.04)

Pattern match(es) are non-exhaustive
Dependents -> Links.dependentsPage namespace packageName (PositiveUnsafe 1)
Dependencies -> Links.dependenciesPage namespace packageName (fromJust mVersion)
Versions -> Links.versionsPage namespace packageName