about summary refs log blame commit diff
path: root/src/Invitations.hs
blob: 62038bb03646e29d3174c35c9024fb40af3100c9 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                                                
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
--------------------------------------------------------------------------------
module Invitations where
--------------------------------------------------------------------------------
import Database.SQLite.Simple

import qualified Types as T
--------------------------------------------------------------------------------

create :: FilePath -> T.InvitationSecret -> T.Email -> T.Role -> IO ()
create dbFile secret email role = withConnection dbFile $ \conn -> do
  execute conn "INSERT INTO Invitations (email,role,secret) VALUES (?,?,?)"
    (email, role, secret)