Procházet zdrojové kódy

storage-node: comment on broken commands in cli

Mokhtar Naamani před 4 roky
rodič
revize
0d0fbe4478
1 změnil soubory, kde provedl 8 přidání a 3 odebrání
  1. 8 3
      storage-node/packages/cli/bin/cli.js

+ 8 - 3
storage-node/packages/cli/bin/cli.js

@@ -81,8 +81,11 @@ const commands = {
   'dev-check': async (api) => {
     let dev = require('./dev')
     return dev.check(api)
-    // await api.assets.checkLiaisonForDataObject(providerId, '')
   },
+  // The upload method is not correctly implemented
+  // needs to get the liaison after creating a data object,
+  // resolve the ipns id to the asset put api url of the storage-node
+  // before uploading..
   'upload': async (api, url, filename, do_type_id, keyfile, passphrase) => {
     load_identity(keyfile, passphrase)
     // Check parameters
@@ -141,7 +144,9 @@ const commands = {
       f.pipe(r)
     })
   },
-
+  // needs to be updated to take a content id and resolve it a potential set
+  // of providers that has it, and select one (possibly try more than one provider)
+  // to fetch it from the get api url of a provider..
   'download': async (api, url, content_id, filename) => {
     const request = require('request')
     url = `${url}asset/v0/${content_id}`
@@ -177,7 +182,7 @@ const commands = {
       r.pipe(f)
     })
   },
-
+  // similar to 'download' function
   'head': async (api, url, content_id) => {
     const request = require('request')
     url = `${url}asset/v0/${content_id}`