use join instead of reduce and slice
This commit is contained in:
parent
8bf97d01c4
commit
9e80606606
1 changed files with 1 additions and 2 deletions
|
@ -276,8 +276,7 @@ const FileListing: FC<{ query?: ParsedUrlQuery }> = ({ query }) => {
|
||||||
c =>
|
c =>
|
||||||
`${baseUrl}/api/raw/?path=${path}/${encodeURIComponent(c.name)}${hashedToken ? `&odpt=${hashedToken}` : ''}`
|
`${baseUrl}/api/raw/?path=${path}/${encodeURIComponent(c.name)}${hashedToken ? `&odpt=${hashedToken}` : ''}`
|
||||||
)
|
)
|
||||||
.reduce((urls, cur) => urls + cur + '\n', '')
|
.join('\n')
|
||||||
.slice(0, -1)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Folder recursive download
|
// Folder recursive download
|
||||||
|
|
Loading…
Reference in a new issue