Commit 8e610c91 authored by Nicolas Lenz's avatar Nicolas Lenz

Fix missing line break in csv

parent a27ca08b
......@@ -48,5 +48,7 @@ getContainersCsvR :: Handler TypedContent
getContainersCsvR = do
allocsE <- runDB $ selectList [] []
let allocs = entityVal <$> (allocsE :: [Entity Allocation])
let csv = "Container,Amount,Location\n" <> concatMap (\a -> tshow (allocationContainer a) <> "," <> tshow (allocationAmount a) <> "," <> tshow (allocationLocation a)) allocs
let csv = "Container,Amount,Location\n" <> concatMap allocToRow allocs
return $ TypedContent "text/csv" (toContent csv)
where
allocToRow a = tshow (allocationContainer a) <> "," <> tshow (allocationAmount a) <> "," <> tshow (allocationLocation a) <> "\n"
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