From 2ea7bc29c64e165003a4a672e031e375f005c390 Mon Sep 17 00:00:00 2001 From: Diogo Biazus Date: Tue, 20 Oct 2015 00:43:21 -0400 Subject: [PATCH] Moves function from top level to where --- src/PostgREST/Auth.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PostgREST/Auth.hs b/src/PostgREST/Auth.hs index 8b8f6e32b..20a7d0285 100644 --- a/src/PostgREST/Auth.hs +++ b/src/PostgREST/Auth.hs @@ -44,7 +44,7 @@ tokenJWT secret (Array a) = JWT.encodeSigned JWT.HS256 (JWT.secret secret) JWT.def { JWT.unregisteredClaims = fromHashMap o } where Object o = if V.null a then emptyObject else V.head a + fromHashMap :: Object -> JWT.ClaimsMap + fromHashMap = M.fromList . H.toList tokenJWT secret _ = tokenJWT secret emptyArray -fromHashMap :: Object -> JWT.ClaimsMap -fromHashMap = M.fromList . H.toList