Commit 531b18c3 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[REFACT] From Core to Prelude.

parent d912a0ad
...@@ -48,7 +48,7 @@ import Servant ...@@ -48,7 +48,7 @@ import Servant
import Servant.Auth.Server import Servant.Auth.Server
import Test.QuickCheck (elements, oneof) import Test.QuickCheck (elements, oneof)
import Test.QuickCheck.Arbitrary (Arbitrary, arbitrary) import Test.QuickCheck.Arbitrary (Arbitrary, arbitrary)
import qualified Gargantext.Core.Auth as Auth import qualified Gargantext.Prelude.Crypto.Auth as Auth
--------------------------------------------------- ---------------------------------------------------
......
...@@ -17,7 +17,7 @@ import Data.Text (Text) ...@@ -17,7 +17,7 @@ import Data.Text (Text)
import GHC.Generics (Generic) import GHC.Generics (Generic)
import Gargantext.Prelude import Gargantext.Prelude
import qualified Gargantext.Core.Crypto.Hash as Crypto (hash) import qualified Gargantext.Prelude.Crypto.Hash as Crypto (hash)
data HashedResponse a = HashedResponse { hash :: Text, value :: a } data HashedResponse a = HashedResponse { hash :: Text, value :: a }
deriving (Generic) deriving (Generic)
......
...@@ -30,7 +30,7 @@ import GHC.Generics (Generic) ...@@ -30,7 +30,7 @@ import GHC.Generics (Generic)
import Gargantext.API.Ngrams import Gargantext.API.Ngrams
import Gargantext.API.Ngrams.Tools (filterListWithRoot, mapTermListRoot, getRepo) import Gargantext.API.Ngrams.Tools (filterListWithRoot, mapTermListRoot, getRepo)
import Gargantext.API.Prelude (GargNoServer) import Gargantext.API.Prelude (GargNoServer)
import Gargantext.Core.Crypto.Hash (hash) import Gargantext.Prelude.Crypto.Hash (hash)
import Gargantext.Core.Types import Gargantext.Core.Types
import Gargantext.Core.Utils.Prefix (unPrefix, unPrefixSwagger) import Gargantext.Core.Utils.Prefix (unPrefix, unPrefixSwagger)
import Gargantext.Database.Action.Metrics.NgramsByNode (getNgramsByNodeOnlyUser) import Gargantext.Database.Action.Metrics.NgramsByNode (getNgramsByNodeOnlyUser)
......
...@@ -30,7 +30,7 @@ import Gargantext.API.Ngrams (TODO) ...@@ -30,7 +30,7 @@ import Gargantext.API.Ngrams (TODO)
import Gargantext.Database.Admin.Types.Node import Gargantext.Database.Admin.Types.Node
import Gargantext.Database.Prelude -- (Cmd, CmdM) import Gargantext.Database.Prelude -- (Cmd, CmdM)
import Gargantext.Prelude import Gargantext.Prelude
import Gargantext.Core.Crypto.Hash (hash) import Gargantext.Prelude.Crypto.Hash (hash)
import Servant import Servant
import Servant.Multipart import Servant.Multipart
import Servant.Swagger (HasSwagger(toSwagger)) import Servant.Swagger (HasSwagger(toSwagger))
......
...@@ -22,7 +22,7 @@ import Data.Swagger ...@@ -22,7 +22,7 @@ import Data.Swagger
import Data.Text (Text, pack, reverse) import Data.Text (Text, pack, reverse)
import Gargantext.Database.Admin.Types.Node (NodeId, UserId) import Gargantext.Database.Admin.Types.Node (NodeId, UserId)
import Gargantext.Prelude hiding (reverse) import Gargantext.Prelude hiding (reverse)
import qualified Gargantext.Core.Auth as Auth import qualified Gargantext.Prelude.Crypto.Auth as Auth
-- FIXME UserName used twice -- FIXME UserName used twice
data User = UserDBId UserId | UserName Text | RootId NodeId | UserPublic data User = UserDBId UserId | UserName Text | RootId NodeId | UserPublic
......
...@@ -28,7 +28,7 @@ import Gargantext.Database.Query.Table.Node ...@@ -28,7 +28,7 @@ import Gargantext.Database.Query.Table.Node
import Gargantext.Database.Query.Table.Node.Error import Gargantext.Database.Query.Table.Node.Error
import Gargantext.Database.Query.Table.Node.UpdateOpaleye (updateHyperdata) import Gargantext.Database.Query.Table.Node.UpdateOpaleye (updateHyperdata)
import Gargantext.Prelude import Gargantext.Prelude
import Gargantext.Core.Crypto.Hash (hash) import Gargantext.Prelude.Crypto.Hash (hash)
import Gargantext.Database.Prelude import Gargantext.Database.Prelude
import Control.Lens (view) import Control.Lens (view)
import Gargantext.Prelude.Config (GargConfig(..)) import Gargantext.Prelude.Config (GargConfig(..))
......
...@@ -72,7 +72,7 @@ import Gargantext.Database.Admin.Types.Hyperdata ...@@ -72,7 +72,7 @@ import Gargantext.Database.Admin.Types.Hyperdata
import Gargantext.Database.Admin.Types.Node import Gargantext.Database.Admin.Types.Node
import Gargantext.Database.Prelude (Cmd, runPGSQuery) import Gargantext.Database.Prelude (Cmd, runPGSQuery)
import Gargantext.Prelude import Gargantext.Prelude
import Gargantext.Core.Crypto.Hash (hash) import Gargantext.Prelude.Crypto.Hash (hash)
import qualified Data.Text as DT (pack, concat, take) import qualified Data.Text as DT (pack, concat, take)
-- TODO : the import of Document constructor below does not work -- TODO : the import of Document constructor below does not work
......
...@@ -39,7 +39,7 @@ import Data.Maybe (Maybe) ...@@ -39,7 +39,7 @@ import Data.Maybe (Maybe)
import Data.Text (Text) import Data.Text (Text)
import Data.Time (UTCTime) import Data.Time (UTCTime)
import Gargantext.Core.Types.Individu import Gargantext.Core.Types.Individu
import qualified Gargantext.Core.Auth as Auth import qualified Gargantext.Prelude.Crypto.Auth as Auth
import Gargantext.Database.Schema.User import Gargantext.Database.Schema.User
import Gargantext.Database.Prelude import Gargantext.Database.Prelude
import Gargantext.Prelude import Gargantext.Prelude
......
...@@ -10,10 +10,10 @@ Portability : POSIX ...@@ -10,10 +10,10 @@ Portability : POSIX
-} -}
module Gargantext.Core.Auth ( createPasswordHash module Gargantext.Prelude.Crypto.Auth ( createPasswordHash
, checkPassword , checkPassword
, module Data.Password.Argon2 , module Data.Password.Argon2
) )
where where
import Control.Monad.IO.Class (MonadIO) import Control.Monad.IO.Class (MonadIO)
......
{-| {-|
Module : Gargantext.Core.Crypto.Hash Module : Gargantext.Prelude.Crypto.Hash
Description : Useful Tools near Prelude of the project Description : Useful Tools near Prelude of the project
Copyright : (c) CNRS, 2017-Present Copyright : (c) CNRS, 2017-Present
License : AGPL + CECILL v3 License : AGPL + CECILL v3
...@@ -11,7 +11,7 @@ Portability : POSIX ...@@ -11,7 +11,7 @@ Portability : POSIX
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# OPTIONS_GHC -fno-warn-orphans #-}
module Gargantext.Core.Crypto.Hash module Gargantext.Prelude.Crypto.Hash
where where
import Prelude (String) import Prelude (String)
......
{-| {-|
Module : Gargantext.Core.Crypto.Pass Module : Gargantext.Prelude.Crypto.Pass
Description : Description :
Copyright : (c) CNRS, 2017-Present Copyright : (c) CNRS, 2017-Present
License : Public Domain License : Public Domain
...@@ -16,7 +16,7 @@ https://zuttobenkyou.wordpress.com/2011/12/23/simple-password-generation-with-ha ...@@ -16,7 +16,7 @@ https://zuttobenkyou.wordpress.com/2011/12/23/simple-password-generation-with-ha
-} -}
module Gargantext.Core.Crypto.Pass module Gargantext.Prelude.Crypto.Pass
where where
-- import Data.List (nub) -- import Data.List (nub)
......
...@@ -11,7 +11,7 @@ Portability : POSIX ...@@ -11,7 +11,7 @@ Portability : POSIX
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE OverloadedStrings #-}
module Gargantext.Core.Mail module Gargantext.Prelude.Mail
(gargMail) (gargMail)
where where
......
...@@ -29,7 +29,7 @@ import qualified System.Random.Shuffle as SRS ...@@ -29,7 +29,7 @@ import qualified System.Random.Shuffle as SRS
import Gargantext.API.Admin.Settings import Gargantext.API.Admin.Settings
import Gargantext.Prelude.Config import Gargantext.Prelude.Config
import Gargantext.Core.Crypto.Hash import Gargantext.Prelude.Crypto.Hash
import Gargantext.Database.Admin.Types.Node (NodeId, NodeType) import Gargantext.Database.Admin.Types.Node (NodeId, NodeType)
import Gargantext.Prelude import Gargantext.Prelude
......
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