From 0d966b5b671be92ccfdc993fecac0095e4e9826e Mon Sep 17 00:00:00 2001 From: Jesse Kempf Date: Mon, 11 Feb 2019 16:52:05 -0800 Subject: [PATCH] Add HasEndpoint instance for BasicAuth --- lib/Servant/Ekg.hs | 4 ++++ servant-ekg.cabal | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Servant/Ekg.hs b/lib/Servant/Ekg.hs index b7c6d0f..99e2b17 100644 --- a/lib/Servant/Ekg.hs +++ b/lib/Servant/Ekg.hs @@ -184,3 +184,7 @@ instance HasEndpoint Raw where instance HasEndpoint (sub :: *) => HasEndpoint (CaptureAll (h :: Symbol) a :> sub) where getEndpoint _ = getEndpoint (Proxy :: Proxy sub) enumerateEndpoints _ = enumerateEndpoints (Proxy :: Proxy sub) + +instance HasEndpoint (sub :: *) => HasEndpoint (BasicAuth (realm :: Symbol) a :> sub) where + getEndpoint _ = getEndpoint (Proxy :: Proxy sub) + enumerateEndpoints _ = enumerateEndpoints (Proxy :: Proxy sub) diff --git a/servant-ekg.cabal b/servant-ekg.cabal index 5cb3606..f71391a 100644 --- a/servant-ekg.cabal +++ b/servant-ekg.cabal @@ -1,6 +1,6 @@ cabal-version: >=1.10 name: servant-ekg -version: 0.3.0.0 +version: 0.3.1.0 synopsis: Helpers for using ekg with servant description: Helpers for using ekg with servant, e.g.. counters per endpoint. license: BSD3