Commit 7c50b9de authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] removing template haskell

parent 556eec9e
Pipeline #855 canceled with stage
...@@ -15,18 +15,16 @@ Individu defintions ...@@ -15,18 +15,16 @@ Individu defintions
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Gargantext.Core.Types.Individu module Gargantext.Core.Types.Individu
where where
import Data.Aeson.TH (deriveJSON) import Data.Aeson
import Control.Monad.IO.Class (MonadIO) import Control.Monad.IO.Class (MonadIO)
import GHC.Generics (Generic) import GHC.Generics (Generic)
import Data.Swagger 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.Core.Utils.Prefix (unPrefix)
import Gargantext.Prelude hiding (reverse) import Gargantext.Prelude hiding (reverse)
import qualified Gargantext.Core.Auth as Auth import qualified Gargantext.Core.Auth as Auth
...@@ -42,6 +40,9 @@ newtype GargPassword = GargPassword Text ...@@ -42,6 +40,9 @@ newtype GargPassword = GargPassword Text
instance Show GargPassword where instance Show GargPassword where
show (GargPassword _) = "*GargPassword*" show (GargPassword _) = "*GargPassword*"
instance ToJSON GargPassword
instance FromJSON GargPassword
instance ToSchema GargPassword instance ToSchema GargPassword
type Email = Text type Email = Text
...@@ -76,5 +77,3 @@ arbitraryUsers :: [(Username, Email, GargPassword)] ...@@ -76,5 +77,3 @@ arbitraryUsers :: [(Username, Email, GargPassword)]
arbitraryUsers = map (\u -> (u, u <> "@gargantext.org", GargPassword $ reverse u)) arbitraryUsername arbitraryUsers = map (\u -> (u, u <> "@gargantext.org", GargPassword $ reverse u)) arbitraryUsername
$(deriveJSON (unPrefix "") ''GargPassword)
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