2 Module : Gargantext.Database.Flow.Annuaire
3 Description : Database Flow Annuaire
4 Copyright : (c) CNRS, 2017-Present
5 License : AGPL + CECILL v3
6 Maintainer : team@gargantext.org
7 Stability : experimental
12 {-# LANGUAGE ConstraintKinds #-}
13 {-# LANGUAGE DeriveGeneric #-}
14 {-# LANGUAGE NoImplicitPrelude #-}
15 {-# LANGUAGE OverloadedStrings #-}
16 {-# LANGUAGE RankNTypes #-}
17 {-# LANGUAGE FlexibleContexts #-}
19 module Gargantext.Database.Flow.Annuaire
25 import Gargantext.Prelude
26 import Gargantext.Database.Flow
30 flowAnnuaire :: FlowCmdM env ServantErr m => FilePath -> m ()
31 flowAnnuaire filePath = do
32 contacts <- liftIO $ deserialiseImtUsersFromFile filePath
33 ps <- flowInsertAnnuaire "Annuaire"
34 $ map (\h-> ToDbContact h)
35 $ map addUniqIdsContact contacts
36 printDebug "length annuaire" ps