remove ghc warnings
This commit is contained in:
parent
e9a68cea0c
commit
72a5ec61ba
1 changed files with 3 additions and 4 deletions
|
@ -258,7 +258,9 @@ instance (HasContextEntry context [(SBS.ByteString, User)], HasServer api contex
|
|||
authWithContext :: (HasContextEntry context [(SBS.ByteString, User)]) =>
|
||||
Context context -> Request -> IO (RouteResult User)
|
||||
authWithContext context request = return $ case lookup "Auth" (requestHeaders request) of
|
||||
Nothing -> FailFatal err401
|
||||
Just authToken -> case lookup authToken userDict of
|
||||
Nothing -> FailFatal err403
|
||||
Just user -> Route user
|
||||
where
|
||||
userDict = getContextEntry context
|
||||
|
@ -285,10 +287,7 @@ data Source = Source (IO SBS.ByteString)
|
|||
instance HasServer api context => HasServer (StreamRequest :> api) context where
|
||||
type ServerT (StreamRequest :> api) m = Source -> ServerT api m
|
||||
route = runServerCombinator $ makeCombinator $
|
||||
\ context request -> return $ Route $ getSource $ requestBody request
|
||||
|
||||
getSource :: IO SBS.ByteString -> Source
|
||||
getSource = Source
|
||||
\ _context request -> return $ Route $ Source $ requestBody request
|
||||
|
||||
-- * utils
|
||||
|
||||
|
|
Loading…
Reference in a new issue