enhance: use /api instead of /api-invoker

This commit is contained in:
Tienson Qin
2022-12-29 23:16:12 +08:00
parent 7fd33b5971
commit c2a4e55f02
3 changed files with 26 additions and 24 deletions

View File

@@ -57,10 +57,12 @@
[dir & {:keys [path-only?]}]
(p/let [result (protocol/readdir (get-fs dir) dir)
result (bean/->clj result)]
(if (and path-only? (map? (first result)))
(->> (map :uri result)
(map gp-util/path-normalize))
(map #(update % :uri gp-util/path-normalize) result))))
(let [result (if (and path-only? (map? (first result)))
(map :uri result)
result)]
(if (and (map? (first result)) (:uri (first result)))
(map #(update % :uri gp-util/path-normalize) result)
(map gp-util/path-normalize result)))))
(defn unlink!
"Should move the path to logseq/recycle instead of deleting it."