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

[REFACT] From Core to Prelude.

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