Browse code

Fix some dumb slip-ups

Jaidyn Levesque authored on 2019-06-21 01:51:56
Showing 1 changed files
... ...
@@ -243,9 +243,8 @@
243 243
 (defun block-rm (hash &key (force nil))
244 244
   "Delete an IPFS block(s).
245 245
   /ipns/docs.ipfs.io/reference/api/http/#api-v0-block-rm"
246
-  (bind-api-result
247
-    (ipfs-call "block/rm" `(("arg" ,hash) ,(if force (list "force" force))))
248
-    nil))
246
+  (ipfs-call "block/rm" `(("arg" ,hash) ,(if force (list "force" force))))
247
+  nil)
249 248
 
250 249
 ;; STRING → ALIST || (NIL STRING)
251 250
 (defun block-stat (hash)
... ...
@@ -298,7 +297,7 @@
298 297
     (gethash "Peers" result)))
299 298
 
300 299
 ;; NIL → LIST || (NIL STRING)
301
-(defun bootstrap-rm-all (peer)
300
+(defun bootstrap-rm-all ()
302 301
   "Remove a peer from the bootstrap list
303 302
   /ipns/docs.ipfs.io/reference/api/http/#api-v0-bootstrap-rm"
304 303
   (bind-api-result
... ...
@@ -447,7 +446,7 @@
447 446
   "Find the closest peer IDs to the given one by querying the DHT.
448 447
   /ipns/docs.ipfs.io/reference/api/http/#api-v0-dht-query"
449 448
   (bind-api-result
450
-    (ipfs-call "dht/query" `(("arg" ,key)))
449
+    (ipfs-call "dht/query" `(("arg" ,peer-id)))
451 450
     (re-hash-table-alist (gethash "Responses" result))))
452 451
 
453 452
 
... ...
@@ -550,7 +549,7 @@
550 549
   "Read a file in given mfs.
551 550
   /ipns/docs.ipfs.io/reference/api/http/#api-v0-files-read"
552 551
   (bind-api-result
553
-    (ipfs-call "files/read" `(("arg" ,source)
552
+    (ipfs-call "files/read" `(("arg" ,path)
554 553
 			      ,(if offset (list "offset" offset))
555 554
 			      ,(if max (list "max" max))))
556 555
     result))
... ...
@@ -560,8 +559,8 @@
560 559
   "Remove a given file.
561 560
   /ipns/docs.ipfs.io/reference/api/http/#api-v0-files-rm"
562 561
   (bind-api-result
563
-    (ipfs-call "files/read" `(("arg" ,source) ("recursive" recursive)
564
-					      ("force" force)))
562
+    (ipfs-call "files/read" `(("arg" ,source) ("recursive" ,recursive)
563
+					      ("force" ,force)))
565 564
     result))
566 565
 
567 566
 ;; STRING → ALIST || (NIL STRING)
... ...
@@ -600,7 +599,7 @@
600 599
 (defun filestore-dups ()
601 600
   "List blocks that're both in the filestore and standard block storage.
602 601
   /ipns/docs.ipfs.io/reference/api/http/#api-v0-filestore-dups"
603
-  (bind-api-alist (ipfs-call "filestore/dups")))
602
+  (bind-api-alist (ipfs-call "filestore/dups" '())))
604 603
 
605 604
 ;; [STRING] → ALIST || (NIL STRING)
606 605
 (defun filestore-ls (&optional cid)
... ...
@@ -984,7 +983,9 @@
984 983
   (bind-api-alist
985 984
     (ipfs-call "refs" `(("arg" ,path)("max-depth" ,max-depth)
986 985
 			,(if (not (empty-string-p recursive))
987
-			   `("recursive" ,recursive))))))
986
+			   `("recursive" ,recursive))
987
+			,(if (not (empty-string-p unique))
988
+			   `("unique" ,unique))))))
988 989
 
989 990
 ;; NIL → ALIST || (NIL STRING)
990 991
 (defun refs-local ()
... ...
@@ -1172,6 +1173,7 @@
1172 1173
 (defmacro error-p (form)
1173 1174
   "Return whether or not a given form errors out."
1174 1175
   `(multiple-value-bind (return error) (ignore-errors ,form)
1176
+     return
1175 1177
      (when error 'T)))
1176 1178
 
1177 1179
 ;; VARYING → BOOLEAN