chore: fix compilation

The App.hs module was missing NamedFieldPuns.
This commit is contained in:
steve-chavez
2024-03-27 19:18:17 -05:00
parent 745e7868b0
commit b75cc853b4
2 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -100,7 +100,7 @@ data Action
| ActSchemaRead Schema Bool | ActSchemaRead Schema Bool
| ActRelationInfo QualifiedIdentifier | ActRelationInfo QualifiedIdentifier
| ActRoutineInfo QualifiedIdentifier | ActRoutineInfo QualifiedIdentifier
| ActSchemaInfo Schema | ActSchemaInfo
{-| {-|
Describes what the user wants to do. This data type is a Describes what the user wants to do. This data type is a
@@ -191,7 +191,7 @@ getAction resource schema method =
(ResourceSchema, "HEAD") -> Right $ ActSchemaRead schema True (ResourceSchema, "HEAD") -> Right $ ActSchemaRead schema True
(ResourceSchema, "GET") -> Right $ ActSchemaRead schema False (ResourceSchema, "GET") -> Right $ ActSchemaRead schema False
(ResourceSchema, "OPTIONS") -> Right $ ActSchemaInfo schema (ResourceSchema, "OPTIONS") -> Right ActSchemaInfo
_ -> Left $ UnsupportedMethod method _ -> Left $ UnsupportedMethod method
where where
+2 -1
View File
@@ -9,6 +9,7 @@ Some of its functionality includes:
- Producing HTTP Headers according to RFCs. - Producing HTTP Headers according to RFCs.
- Content Negotiation - Content Negotiation
-} -}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE RecordWildCards #-}
module PostgREST.App module PostgREST.App
( postgrest ( postgrest
@@ -190,7 +191,7 @@ handleRequest AuthResult{..} conf appState authenticated prepared pgVer apiReq@A
(respTime', pgrst) <- withTiming $ liftEither $ Response.infoProcResponse (Plan.crProc cPlan) (respTime', pgrst) <- withTiming $ liftEither $ Response.infoProcResponse (Plan.crProc cPlan)
return $ pgrstResponse (ServerTiming jwtTime parseTime planTime' Nothing respTime') pgrst return $ pgrstResponse (ServerTiming jwtTime parseTime planTime' Nothing respTime') pgrst
ActSchemaInfo _ -> do ActSchemaInfo -> do
(respTime', pgrst) <- withTiming $ liftEither Response.infoRootResponse (respTime', pgrst) <- withTiming $ liftEither Response.infoRootResponse
return $ pgrstResponse (ServerTiming jwtTime parseTime Nothing Nothing respTime') pgrst return $ pgrstResponse (ServerTiming jwtTime parseTime Nothing Nothing respTime') pgrst