Commit e5bb3ecc authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[document export] add garg version

parent 1f68e162
......@@ -11,12 +11,15 @@ Portability : POSIX
module Gargantext.API.Node.Document.Export
where
import qualified Data.Text as T
import Data.Version (showVersion)
import Gargantext.API.Node.Document.Export.Types
import Gargantext.API.Prelude (GargNoServer)
import Gargantext.Core.Types
-- import Gargantext.Database.Admin.Types.Hyperdata (HyperdataDocument(..))
import Gargantext.Database.Query.Table.Node (getDocumentsWithParentId)
import Gargantext.Prelude
import qualified Paths_gargantext as PG -- cabal magic build module
-- import Servant (Proxy(..))
--------------------------------------------------
......@@ -28,7 +31,7 @@ getDocuments pId = do
docs <- getDocumentsWithParentId pId -- NodeDocument (Proxy :: Proxy HyperdataDocument)
printDebug "[getDocuments] got docs" docs
pure $ DocumentExport { _de_documents = mapDoc <$> docs
, _de_garg_version = "" }
, _de_garg_version = T.pack $ showVersion PG.version }
where
mapDoc d = Document { _d_document = d
, _d_ngrams = Ngrams { _ng_ngrams = []
......
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