1
0
Эх сурвалжийг харах

fix: correct api calls

Also update cli install instructions
Gabriel Horner 2 сар өмнө
parent
commit
9c6b7a2a6d

+ 1 - 6
deps/cli/README.md

@@ -119,12 +119,7 @@ First install the following dependencies:
 * Run `yarn install` to install npm dependencies.
 * Run `yarn install` to install npm dependencies.
 * Install [babashka](https://github.com/babashka/babashka).
 * Install [babashka](https://github.com/babashka/babashka).
 
 
-To install the CLI locally, `npm i -g`.
-
-To run linters and tests, you'll want to install yarn dependencies once:
-```
-yarn install
-```
+To install the CLI locally, `yarn link`.
 
 
 ### Testing
 ### Testing
 
 

+ 1 - 1
deps/cli/src/logseq/cli/commands/query.cljs

@@ -21,7 +21,7 @@
 (defn- api-query
 (defn- api-query
   [query token]
   [query token]
   (let [datalog-query? (string/starts-with? query "[")
   (let [datalog-query? (string/starts-with? query "[")
-        method (if datalog-query?  "logseq.app.datascript_query" "logseq.app.q")]
+        method (if datalog-query?  "logseq.db.datascript_query" "logseq.db.q")]
     (-> (p/let [resp (cli-util/api-fetch token method [query])]
     (-> (p/let [resp (cli-util/api-fetch token method [query])]
           (if (= 200 (.-status resp))
           (if (= 200 (.-status resp))
             (p/let [body (.json resp)]
             (p/let [body (.json resp)]