From e53b55351ccdb8f57334730a12d7642e36f00637 Mon Sep 17 00:00:00 2001 From: ambienthack Date: Wed, 30 Aug 2023 19:30:44 +0600 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=BC=D0=B0=D0=BD=D0=B4=D1=8B=20`uploader=20downlo?= =?UTF-8?q?adFiles`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/insalesApi/listFile.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/insalesApi/listFile.js b/lib/insalesApi/listFile.js index f92ffbf..caa94dc 100644 --- a/lib/insalesApi/listFile.js +++ b/lib/insalesApi/listFile.js @@ -13,10 +13,10 @@ export default function listFile (options, paths) { token: options.account.token, url: options.account.url }).then(response => { - let files = response.data.files.file.reduce((prev, curr)=> { - const name = upath.parse(curr['absolute-url']).base; + let files = response.data.reduce((prev, curr)=> { + const name = upath.parse(curr['absolute_url']).base; const path = upath.normalize(paths.files + '/' + name); - const url = curr['absolute-url']; + const url = curr['absolute_url']; return [...prev, {name,path,url}] }, []); @@ -26,7 +26,7 @@ export default function listFile (options, paths) { console.log(err.msg); } console.log(err); - resole([]); + resolve([]); }); }) }