From b75cc853b4acfabfc044de305dfa5fbf18cea165 Mon Sep 17 00:00:00 2001 From: steve-chavez Date: Wed, 27 Mar 2024 19:17:42 -0500 Subject: [PATCH] chore: fix compilation The App.hs module was missing NamedFieldPuns. --- src/PostgREST/ApiRequest.hs | 4 ++-- src/PostgREST/App.hs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/PostgREST/ApiRequest.hs b/src/PostgREST/ApiRequest.hs index 0327bc9ef..a58d7b1e0 100644 --- a/src/PostgREST/ApiRequest.hs +++ b/src/PostgREST/ApiRequest.hs @@ -100,7 +100,7 @@ data Action | ActSchemaRead Schema Bool | ActRelationInfo QualifiedIdentifier | ActRoutineInfo QualifiedIdentifier - | ActSchemaInfo Schema + | ActSchemaInfo {-| 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, "GET") -> Right $ ActSchemaRead schema False - (ResourceSchema, "OPTIONS") -> Right $ ActSchemaInfo schema + (ResourceSchema, "OPTIONS") -> Right ActSchemaInfo _ -> Left $ UnsupportedMethod method where diff --git a/src/PostgREST/App.hs b/src/PostgREST/App.hs index 62673b1f7..ccc16bdd3 100644 --- a/src/PostgREST/App.hs +++ b/src/PostgREST/App.hs @@ -9,6 +9,7 @@ Some of its functionality includes: - Producing HTTP Headers according to RFCs. - Content Negotiation -} +{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE RecordWildCards #-} module PostgREST.App ( postgrest @@ -190,7 +191,7 @@ handleRequest AuthResult{..} conf appState authenticated prepared pgVer apiReq@A (respTime', pgrst) <- withTiming $ liftEither $ Response.infoProcResponse (Plan.crProc cPlan) return $ pgrstResponse (ServerTiming jwtTime parseTime planTime' Nothing respTime') pgrst - ActSchemaInfo _ -> do + ActSchemaInfo -> do (respTime', pgrst) <- withTiming $ liftEither Response.infoRootResponse return $ pgrstResponse (ServerTiming jwtTime parseTime Nothing Nothing respTime') pgrst