Commit c0fde235 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] addHeader - String -> Text

parent 3f3886d7
...@@ -23,6 +23,7 @@ Portability : POSIX ...@@ -23,6 +23,7 @@ Portability : POSIX
module Gargantext.API.Ngrams.List module Gargantext.API.Ngrams.List
where where
import Data.Text (Text)
import Data.Aeson import Data.Aeson
import Data.List (zip) import Data.List (zip)
import Data.Map (Map, toList, fromList) import Data.Map (Map, toList, fromList)
...@@ -46,7 +47,7 @@ instance ToJSON a => MimeRender HTML a where ...@@ -46,7 +47,7 @@ instance ToJSON a => MimeRender HTML a where
type API = Get '[JSON] NgramsList type API = Get '[JSON] NgramsList
:<|> ReqBody '[JSON] NgramsList :> Put '[JSON] Bool :<|> ReqBody '[JSON] NgramsList :> Put '[JSON] Bool
:<|> Get '[HTML] (Headers '[Header "Content-Disposition" String] NgramsList) :<|> Get '[HTML] (Headers '[Header "Content-Disposition" Text] NgramsList)
api :: ListId -> GargServer API api :: ListId -> GargServer API
api l = get l :<|> put l :<|> getHtml l api l = get l :<|> put l :<|> getHtml l
...@@ -58,7 +59,7 @@ get lId = fromList ...@@ -58,7 +59,7 @@ get lId = fromList
<$> mapM (getNgramsTableMap lId) ngramsTypes <$> mapM (getNgramsTableMap lId) ngramsTypes
getHtml :: RepoCmdM env err m getHtml :: RepoCmdM env err m
=> ListId -> m (Headers '[Header "Content-Disposition" String] NgramsList) => ListId -> m (Headers '[Header "Content-Disposition" Text] NgramsList)
getHtml lId = do getHtml lId = do
lst <- get lId lst <- get lId
return $ addHeader "attachment" lst return $ addHeader "attachment" lst
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment