hunt warnings
This commit is contained in:
parent
bb89288507
commit
645f378bec
4 changed files with 6 additions and 3 deletions
|
@ -30,13 +30,13 @@ avatarGet aid = do
|
|||
as <- liftIO $ avatarSelectById aid conn
|
||||
if null as
|
||||
then
|
||||
return ((\_ respond -> respond $ responseStream status404 [] $
|
||||
return ((\_ response -> response $ responseStream status404 [] $
|
||||
\write flush -> do
|
||||
write "No avatar found."
|
||||
flush
|
||||
) :: Application)
|
||||
else
|
||||
return ((\_ respond -> respond $ responseStream status200 [(hETag, encodeUtf8 (avatarHash (head as)))] $
|
||||
return ((\_ response -> response $ responseStream status200 [(hETag, encodeUtf8 (avatarHash (head as)))] $
|
||||
\write flush -> do
|
||||
write $ byteString $ encodeUtf8 $ avatarData $ head as
|
||||
flush
|
||||
|
|
|
@ -5,7 +5,6 @@ import Servant
|
|||
|
||||
import Control.Monad (void)
|
||||
import Control.Monad.Reader (asks)
|
||||
import Control.Monad.Extra (anyM)
|
||||
|
||||
-- internal imports
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@ module Control.Role where
|
|||
|
||||
import Servant
|
||||
|
||||
import Control.Monad (void)
|
||||
|
||||
import Control.Monad.Reader (asks)
|
||||
|
||||
-- internal imports
|
||||
|
|
|
@ -11,6 +11,8 @@ import Data.Maybe (fromMaybe)
|
|||
|
||||
import Data.Profunctor.Product.Default (Default)
|
||||
|
||||
import Data.String (fromString)
|
||||
|
||||
import qualified Data.Text as T
|
||||
|
||||
import qualified Data.Text.Encoding as E
|
||||
|
|
Loading…
Reference in a new issue