aboutsummaryrefslogtreecommitdiffstats
path: root/backend
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2024-06-06 15:20:33 +0200
committerLibravatar Alexander Foremny <aforemny@posteo.de>2024-06-06 15:20:33 +0200
commitfebd2d7a243d540fa083be78783059762fcb42c7 (patch)
treeb507906eb62243894580b87493bfe89c0adb0a4d /backend
parentd39c1665f842bb93fd2c7e291a11aa000120350c (diff)
add `$fileName` to values
Diffstat (limited to 'backend')
-rw-r--r--backend/app/Main.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/backend/app/Main.hs b/backend/app/Main.hs
index 8bd02b2..df5dee8 100644
--- a/backend/app/Main.hs
+++ b/backend/app/Main.hs
@@ -127,10 +127,10 @@ initRepo root ref = do
let cls =
M.toList . M.unionsWith (++) $
map (\f -> M.singleton (takeDirectory f) [f]) fs
- colls <- forM cls $ \(path, (file : files)) -> do
+ colls <- forM cls $ \(path, files) -> do
(value : values) <- do
- liftIO $ Q.withStore root ref do
- mapM (Q.withCommit cid . Q.readFile) (file : files)
+ liftIO . Q.withStore root ref . Q.withCommit cid $ do
+ Q.query (fromString ("SELECT " <> path <> " FROM " <> path))
let schema = U.autoTypes' value values
pure $ Collection path files schema
let schemaVersion =