Move JSONSettings into Common.Server
This commit is contained in:
parent
64736a8011
commit
ac32f29c83
|
@ -67,7 +67,6 @@ executable chan-delorean
|
|||
-- Modules included in this executable, other than Main.
|
||||
other-modules:
|
||||
JSONParsing
|
||||
JSONSettings
|
||||
SitesType
|
||||
BoardsType
|
||||
ThreadType
|
||||
|
@ -80,6 +79,7 @@ executable chan-delorean
|
|||
Data.WordUtil
|
||||
Network.DataClient
|
||||
Network.DataClientTypes
|
||||
Common.Server.JSONSettings
|
||||
|
||||
-- LANGUAGE extensions used by modules in this package.
|
||||
-- other-extensions:
|
||||
|
|
|
@ -33,7 +33,7 @@ import Network.Mime (defaultMimeLookup)
|
|||
import PerceptualHash (fileHash)
|
||||
|
||||
import JSONParsing
|
||||
import JSONSettings
|
||||
import Common.Server.JSONSettings
|
||||
import qualified JSONCommonTypes as JS
|
||||
import qualified JSONPost as JSONPosts
|
||||
import qualified Network.DataClient as Client
|
||||
|
@ -96,11 +96,11 @@ ensureSiteExists settings = do
|
|||
|
||||
|
||||
createArchivesForNewBoards
|
||||
:: JSONSettings ->
|
||||
Set String ->
|
||||
[ String ] ->
|
||||
Int ->
|
||||
IO [ Boards.Board ]
|
||||
:: JSONSettings
|
||||
-> Set String
|
||||
-> [ String ]
|
||||
-> Int
|
||||
-> IO [ Boards.Board ]
|
||||
createArchivesForNewBoards settings dirsSet archived_boards siteid = do
|
||||
let archivedBoardsSet = Set.fromList archived_boards
|
||||
|
||||
|
@ -341,7 +341,7 @@ copyFiles settings (site, board, thread, _, path, attachment) = do
|
|||
|
||||
common_dest :: FilePath
|
||||
common_dest
|
||||
= (JSONSettings.media_root_path settings)
|
||||
= (media_root_path settings)
|
||||
</> Sites.name site
|
||||
</> Boards.pathpart board
|
||||
</> (show $ Threads.board_thread_id thread)
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit cff3dd9e9fd013a0eedaa17df52e8f9eb5ef73c6
|
||||
Subproject commit eb624edd0e0be526f7ccfda080b437d7a365f466
|
|
@ -1,17 +0,0 @@
|
|||
module JSONSettings
|
||||
( JSONSettings(..)
|
||||
) where
|
||||
|
||||
import GHC.Generics
|
||||
import Data.Aeson (FromJSON)
|
||||
|
||||
data JSONSettings = JSONSettings
|
||||
{ postgrest_url :: String
|
||||
, jwt :: String
|
||||
, backup_read_root :: FilePath
|
||||
, media_root_path :: FilePath
|
||||
, site_name :: String
|
||||
, site_url :: String
|
||||
} deriving (Show, Generic)
|
||||
|
||||
instance FromJSON JSONSettings
|
|
@ -37,7 +37,7 @@ import Data.Aeson
|
|||
)
|
||||
import GHC.Generics
|
||||
|
||||
import qualified JSONSettings as T
|
||||
import qualified Common.Server.JSONSettings as T
|
||||
import qualified SitesType as Sites
|
||||
import qualified BoardsType as Boards
|
||||
import qualified ThreadType as Threads
|
||||
|
|
Loading…
Reference in New Issue