aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/Config.hs
diff options
context:
space:
mode:
authorpacien2020-06-13 03:41:39 +0200
committerpacien2020-06-16 18:23:01 +0200
commitce2210e6deff1d981186b6d7ddb1176f27e41f49 (patch)
tree63d83660e733f16ef18d48debbc97c091c492c1f /compiler/src/Config.hs
parent34b90f08a21fbe3f1928e16a8ea48f1fc7453e4e (diff)
downloadldgallery-ce2210e6deff1d981186b6d7ddb1176f27e41f49.tar.gz
compiler: make GalleryIndex loadable from JSON
Diffstat (limited to 'compiler/src/Config.hs')
-rw-r--r--compiler/src/Config.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/src/Config.hs b/compiler/src/Config.hs
index 3c38a17..afcfb36 100644
--- a/compiler/src/Config.hs
+++ b/compiler/src/Config.hs
@@ -84,7 +84,7 @@ readConfig = decodeYamlFile
84data ViewerConfig = ViewerConfig 84data ViewerConfig = ViewerConfig
85 { galleryTitle :: String 85 { galleryTitle :: String
86 , tagCategories :: [String] 86 , tagCategories :: [String]
87 } deriving (Generic, ToJSON, Show) 87 } deriving (Generic, ToJSON, FromJSON, Show)
88 88
89viewerConfig :: GalleryConfig -> ViewerConfig 89viewerConfig :: GalleryConfig -> ViewerConfig
90viewerConfig GalleryConfig{galleryTitle, tagCategories} = ViewerConfig galleryTitle tagCategories 90viewerConfig GalleryConfig{galleryTitle, tagCategories} = ViewerConfig galleryTitle tagCategories