From 9e549d8386585361bc867808c31b5be0e345f754 Mon Sep 17 00:00:00 2001 From: vcheckzen <18008498+vcheckzen@users.noreply.github.com> Date: Tue, 29 Oct 2024 07:07:52 +0800 Subject: [PATCH] fix: remove empty field --- back-end-cf/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/back-end-cf/index.js b/back-end-cf/index.js index c32ecab7..2aa1c0d3 100644 --- a/back-end-cf/index.js +++ b/back-end-cf/index.js @@ -182,7 +182,7 @@ async function authenticate(path, passwd) { `${path}/${PASSWD_FILENAME}`, null, true - ).then((resp) => (resp.status === 404 ? '' : resp.text())); + ).then((resp) => (resp.status === 404 ? undefined : resp.text())); if (pwFileContent) { if (passwd !== pwFileContent) { @@ -214,7 +214,7 @@ async function fetchFiles(path, passwd, skipToken, orderby) { const expand = [ '/children?select=name,size,parentReference,lastModifiedDateTime,@microsoft.graph.downloadUrl', orderby ? `&$orderby=${orderby}` : '', - skipToken ? `&skiptoken=${skipToken}` : '' + skipToken ? `&skiptoken=${skipToken}` : '', ].join(''); const uri = OAUTH.apiUrl + path + expand; @@ -227,7 +227,7 @@ async function fetchFiles(path, passwd, skipToken, orderby) { skipToken = pageRes['@odata.nextLink'] ? new URL(pageRes['@odata.nextLink']).searchParams.get('$skiptoken') - : ''; + : undefined; const children = pageRes.value; return JSON.stringify({