Skip to content

Commit

Permalink
fix: remove empty field
Browse files Browse the repository at this point in the history
  • Loading branch information
vcheckzen committed Oct 28, 2024
1 parent 6badd88 commit 9e549d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions back-end-cf/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;

Expand All @@ -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({
Expand Down

0 comments on commit 9e549d8

Please sign in to comment.