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.Action.Flow.Annuaire
24 import Gargantext.Prelude
25 import Gargantext.Database.Flow
29 flowAnnuaire :: FlowCmdM env ServantErr m => FilePath -> m ()
30 flowAnnuaire filePath = do
31 contacts <- liftBase $ deserialiseImtUsersFromFile filePath
32 ps <- flowInsertAnnuaire "Annuaire"
33 $ map (\h-> ToDbContact h)
34 $ map addUniqIdsContact contacts
35 printDebug "length annuaire" ps