Skip to content

Commit

Permalink
Bump
Browse files Browse the repository at this point in the history
  • Loading branch information
jaspervdj committed Jan 8, 2025
1 parent 0628795 commit 4bcbf7b
Show file tree
Hide file tree
Showing 29 changed files with 51 additions and 1,759 deletions.
15 changes: 7 additions & 8 deletions lib/Zureg/Database.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{-# LANGUAGE TypeFamilies #-}
module Zureg.Database
( Config (..)
, defaultConfig
, configFromEnv
, Handle
, withHandle
, writeEvents
Expand All @@ -26,6 +26,7 @@ import qualified Data.Aeson as A
import qualified Data.Aeson.TH.Extended as A
import qualified Data.Text as T
import Data.UUID (UUID)
import System.Environment (lookupEnv)
import Zureg.Model

data DatabaseException
Expand All @@ -37,15 +38,13 @@ data DatabaseException
instance Exception DatabaseException

data Config = Config
{ cRegistrantTable :: !T.Text
, cEmailTable :: !T.Text
, cSummariesTable :: !T.Text
{ cConnectionString :: !T.Text
}

$(A.deriveJSON A.options ''Config)

defaultConfig :: Config
defaultConfig = Config "registrants" "emails" "summaries"
configFromEnv :: IO Config
configFromEnv = do
cstring <- lookupEnv "ZUREG_DB" >>= maybe (fail "ZUREG_DB not set") pure
pure Config {cConnectionString = T.pack cstring}

data Handle = Handle
{ hConfig :: !Config
Expand Down
12 changes: 1 addition & 11 deletions lib/Zureg/Hackathon.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ import Data.List (intercalate)
import Data.Maybe (fromMaybe)
import System.Environment (lookupEnv)
import Zureg.Hackathon.Interface
import qualified Zureg.Hackathon.ZuriHac2019 as ZuriHac2019
import qualified Zureg.Hackathon.ZuriHac2020 as ZuriHac2020
import qualified Zureg.Hackathon.ZuriHac2021 as ZuriHac2021
import qualified Zureg.Hackathon.ZuriHac2022 as ZuriHac2022
import qualified Zureg.Hackathon.ZuriHac2023 as ZuriHac2023
import qualified Zureg.Hackathon.ZuriHac2024 as ZuriHac2024

-- | Load the hackathon stored in the 'ZUREG_HACKATHON' environment variable.
Expand All @@ -39,10 +34,5 @@ data SomeHackathon =

hackathons :: [(String, IO SomeHackathon)]
hackathons =
[ ("zurihac2019", SomeHackathon <$> ZuriHac2019.newHackathon)
, ("zurihac2020", SomeHackathon <$> ZuriHac2020.newHackathon)
, ("zurihac2021", SomeHackathon <$> ZuriHac2021.newHackathon)
, ("zurihac2022", SomeHackathon <$> ZuriHac2022.newHackathon)
, ("zurihac2023", SomeHackathon <$> ZuriHac2023.newHackathon)
, ("zurihac2024", SomeHackathon <$> ZuriHac2024.newHackathon)
[ ("zurihac2024", SomeHackathon <$> ZuriHac2024.newHackathon)
]
2 changes: 0 additions & 2 deletions lib/Zureg/Hackathon/Interface.hs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ data Hackathon a = Hackathon
-- | CSV header
, csvHeader :: Csv.Header

-- | Database configuration
, databaseConfig :: Database.Config
-- | Email sending configuration
, sendEmailConfig :: SendEmail.Config
-- | Captcha configuration
Expand Down
54 changes: 0 additions & 54 deletions lib/Zureg/Hackathon/ZuriHac2019.hs

This file was deleted.

129 changes: 0 additions & 129 deletions lib/Zureg/Hackathon/ZuriHac2019/Form.hs

This file was deleted.

69 changes: 0 additions & 69 deletions lib/Zureg/Hackathon/ZuriHac2019/Main/ProjectsPage.hs

This file was deleted.

Loading

0 comments on commit 4bcbf7b

Please sign in to comment.