File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,7 @@ export const getFavoritesReport = function(): string {
128128 * Get the SEARCH body to search for recently modified files
129129 *
130130 * @param lastModified Oldest timestamp to include (Unix timestamp)
131+ * @param limit Maximum number of items to return
131132 * @example
132133 * ```ts
133134 * // SEARCH for recent files need a different DAV endpoint
@@ -145,7 +146,7 @@ export const getFavoritesReport = function(): string {
145146 * }) as ResponseDataDetailed<FileStat[]>
146147 * ```
147148 */
148- export const getRecentSearch = function ( lastModified : number ) : string {
149+ export const getRecentSearch = function ( lastModified : number , limit : number = 100 ) : string {
149150 return `<?xml version="1.0" encoding="UTF-8"?>
150151<d:searchrequest ${ getDavNameSpaces ( ) }
151152 xmlns:ns="https://github.com/icewind1991/SearchDAV/ns">
@@ -196,7 +197,7 @@ export const getRecentSearch = function(lastModified: number): string {
196197 </d:order>
197198 </d:orderby>
198199 <d:limit>
199- <d:nresults>100 </d:nresults>
200+ <d:nresults>${ limit } </d:nresults>
200201 <ns:firstresult>0</ns:firstresult>
201202 </d:limit>
202203 </d:basicsearch>
You can’t perform that action at this time.
0 commit comments