diff --git a/chan-delorean.cabal b/chan-delorean.cabal index d36181e..6af8b36 100644 --- a/chan-delorean.cabal +++ b/chan-delorean.cabal @@ -75,7 +75,7 @@ executable chan-delorean JSONPost JSONCommonTypes Common.PostsType - AttachmentType + Common.AttachmentType Hash Data.WordUtil diff --git a/src/AttachmentType.hs b/src/AttachmentType.hs deleted file mode 100644 index d2e731f..0000000 --- a/src/AttachmentType.hs +++ /dev/null @@ -1,35 +0,0 @@ -{-# LANGUAGE DeriveAnyClass #-} -module AttachmentType -( Attachment (..) -, Dimension (..) -, Paths (..) -) where - -import GHC.Generics -import Data.Int (Int64) -import Data.Aeson (FromJSON, ToJSON) -import Data.Text (Text) -import Data.Time.Clock (UTCTime) - -data Dimension = Dimension - { width :: Int - , height :: Int - } deriving (Show, Generic, FromJSON, ToJSON) - -data Paths = Paths - { file_path :: FilePath - , thumbnail_path :: FilePath - } deriving (Show) - -data Attachment = Attachment - { mimetype :: Text - , creation_time :: UTCTime - , sha256_hash :: Text - , phash :: Maybe Int64 - , illegal :: Bool - , post_id :: Int64 - , resolution :: Maybe Dimension - , file_extension :: Maybe Text - , original_filename :: Maybe Text - , file_size_bytes :: Int - } deriving (Show, Generic, FromJSON, ToJSON) diff --git a/src/Backfill.hs b/src/Backfill.hs index 2fea516..d2d3708 100644 --- a/src/Backfill.hs +++ b/src/Backfill.hs @@ -35,7 +35,7 @@ import qualified DataClient as Client import qualified SitesType as Sites import qualified BoardsType as Boards import qualified ThreadType as Threads -import qualified AttachmentType as At +import qualified Common.AttachmentType as At import qualified Common.PostsType as Posts import qualified Hash as Hash import qualified Data.WordUtil as Words diff --git a/src/Common b/src/Common index 7a1ee28..915d87d 160000 --- a/src/Common +++ b/src/Common @@ -1 +1 @@ -Subproject commit 7a1ee2819b34a10566d96faee2e33f8161546399 +Subproject commit 915d87dd6e5003019b28d3c2e682042a04bf375b diff --git a/src/DataClient.hs b/src/DataClient.hs index fe91a44..f05a41e 100644 --- a/src/DataClient.hs +++ b/src/DataClient.hs @@ -48,7 +48,7 @@ import qualified JSONSettings as T import qualified SitesType as Sites import qualified BoardsType as Boards import qualified ThreadType as Threads -import qualified AttachmentType as Attachments +import qualified Common.AttachmentType as Attachments import qualified Common.PostsType as Posts data HttpError