Reformatting

This commit is contained in:
2018-08-04 23:53:40 +03:00
parent e6086ee34f
commit bcc702b95c
4 changed files with 51 additions and 32 deletions

View File

@ -13,7 +13,7 @@
module Server where
import qualified API as API
import qualified API.Users as Users
import Server.Auth (authCheck)
import Servant
import Types
import ClassyPrelude hiding (Handler)
@ -31,7 +31,7 @@ server app = serveWithContext api cfg (enter server' API.handler :<|> serveDirec
where
myKey = view (field @"jwk") app
jwtCfg = defaultJWTSettings myKey
authCfg = Users.authCheck app
authCfg = authCheck app
cfg = jwtCfg :. defaultCookieSettings :. authCfg :. EmptyContext
server' :: AppM :~> Servant.Handler
server' = NT (Handler . ExceptT . try . (`runReaderT` app) . (runFileLoggingT "logs/server.log"))