refactor: remove auth and logging middleware
This commit removes auth middleware for it hides side effects and obscures logic. The auth operations are now done in its own stage in the request-response cycle. It also removes the logging middleware because now we instead use observation module to log the response.
This commit is contained in:
committed by
Steve Chavez
parent
0bba1d265a
commit
98f8e52b46
@@ -16,6 +16,7 @@ import qualified Hasql.Connection as SQL
|
||||
import qualified Hasql.Pool as SQL
|
||||
import qualified Hasql.Pool.Observation as SQL
|
||||
import Network.HTTP.Types.Status (Status)
|
||||
import qualified Network.Wai as Wai
|
||||
import PostgREST.Config.PgVersion
|
||||
import PostgREST.Query (MainQuery)
|
||||
import PostgREST.SchemaCache (QueryTimings)
|
||||
@@ -52,6 +53,7 @@ data Observation
|
||||
| PoolInit Int
|
||||
| PoolAcqTimeoutObs
|
||||
| HasqlPoolObs SQL.Observation
|
||||
| ResponseObs (Maybe ByteString) Wai.Request Status (Maybe Integer)
|
||||
| PoolRequest
|
||||
| PoolRequestFullfilled
|
||||
| PoolFlushed
|
||||
|
||||
Reference in New Issue
Block a user