Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/dav/davProperties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export const getFavoritesReport = function(): string {
* Get the SEARCH body to search for recently modified files
*
* @param lastModified Oldest timestamp to include (Unix timestamp)
* @param limit Maximum number of items to return
* @example
* ```ts
* // SEARCH for recent files need a different DAV endpoint
Expand All @@ -145,7 +146,7 @@ export const getFavoritesReport = function(): string {
* }) as ResponseDataDetailed<FileStat[]>
* ```
*/
export const getRecentSearch = function(lastModified: number): string {
export const getRecentSearch = function(lastModified: number, limit: number = 100): string {
return `<?xml version="1.0" encoding="UTF-8"?>
<d:searchrequest ${getDavNameSpaces()}
xmlns:ns="https://github.com/icewind1991/SearchDAV/ns">
Expand Down Expand Up @@ -196,7 +197,7 @@ export const getRecentSearch = function(lastModified: number): string {
</d:order>
</d:orderby>
<d:limit>
<d:nresults>100</d:nresults>
<d:nresults>${limit}</d:nresults>
<ns:firstresult>0</ns:firstresult>
</d:limit>
</d:basicsearch>
Expand Down
Loading