Refactor/db (#945)

* fix(db): rebuild-page-blocks-children

* refactor(db): template-exists?

* refactor(db): sub-key-value

* refactor(db): get-pages-with-modified-at

* style(page): fix style
This commit is contained in:
Michael Wong
2020-12-17 17:28:00 +08:00
committed by GitHub
parent 3e7f7e1f52
commit 1d4d2ee53e
7 changed files with 49 additions and 92 deletions

View File

@@ -336,6 +336,15 @@
{:key [:kv key]})
(remove-key! repo-url key)))
(defn sub-key-value
([key]
(sub-key-value (state/get-current-repo) key))
([repo-url key]
(when (conn/get-conn repo-url)
(-> (q repo-url [:kv key] {} key key)
react
key))))
(defn set-file-content!
[repo path content]
(when (and repo path)