diff options
author | Joris | 2017-06-05 18:02:13 +0200 |
---|---|---|
committer | Joris | 2017-06-05 18:02:13 +0200 |
commit | 0b191f5c48edffc9da3e38c284e9640fd82e7cb1 (patch) | |
tree | c729e53822e7c41c1a854d82d25636e58ee65c9f /src/server/Model/Json/User.hs | |
parent | 5c110716cfda6e616a795edd12f2012b132dca9f (diff) |
Replace persistent by sqlite-simple
Diffstat (limited to 'src/server/Model/Json/User.hs')
-rw-r--r-- | src/server/Model/Json/User.hs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/server/Model/Json/User.hs b/src/server/Model/Json/User.hs index ebc347b..c289fe0 100644 --- a/src/server/Model/Json/User.hs +++ b/src/server/Model/Json/User.hs @@ -2,14 +2,15 @@ module Model.Json.User ( User(..) + , fromUser ) where -import GHC.Generics - import Data.Aeson import Data.Text (Text) +import GHC.Generics -import Model.Database (UserId) +import Model.User (UserId) +import qualified Model.User as M data User = User { id :: UserId @@ -19,3 +20,6 @@ data User = User instance FromJSON User instance ToJSON User + +fromUser :: M.User -> User +fromUser user = User (M.id user) (M.name user) (M.email user) |