diff options
Diffstat (limited to 'common/src/Common/Model')
-rw-r--r-- | common/src/Common/Model/Email.hs | 12 | ||||
-rw-r--r-- | common/src/Common/Model/SignInForm.hs (renamed from common/src/Common/Model/SignIn.hs) | 10 |
2 files changed, 17 insertions, 5 deletions
diff --git a/common/src/Common/Model/Email.hs b/common/src/Common/Model/Email.hs new file mode 100644 index 0000000..e938f83 --- /dev/null +++ b/common/src/Common/Model/Email.hs @@ -0,0 +1,12 @@ +module Common.Model.Email + ( Email(..) + ) where + +import Data.Aeson (FromJSON, ToJSON) +import Data.Text (Text) +import GHC.Generics (Generic) + +newtype Email = Email Text deriving (Show, Generic) + +instance FromJSON Email +instance ToJSON Email diff --git a/common/src/Common/Model/SignIn.hs b/common/src/Common/Model/SignInForm.hs index bfd7fbc..2b8c955 100644 --- a/common/src/Common/Model/SignIn.hs +++ b/common/src/Common/Model/SignInForm.hs @@ -1,14 +1,14 @@ -module Common.Model.SignIn - ( SignIn(..) +module Common.Model.SignInForm + ( SignInForm(..) ) where import Data.Aeson (FromJSON, ToJSON) import Data.Text (Text) import GHC.Generics (Generic) -data SignIn = SignIn +data SignInForm = SignInForm { _signIn_email :: Text } deriving (Show, Generic) -instance FromJSON SignIn -instance ToJSON SignIn +instance FromJSON SignInForm +instance ToJSON SignInForm |