mirror of
https://github.com/Nezumi-2711/onedrive-vercel-index.git
synced 2026-09-22 13:38:45 +00:00
use join instead of reduce and slice
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user