Skip to content

Commit

Permalink
Add query parameter to fetcher
Browse files Browse the repository at this point in the history
  • Loading branch information
davelopez committed May 13, 2024
1 parent 5bf0fd3 commit 8099e89
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/src/api/remoteFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,18 @@ export const remoteFilesFetcher = fetcher.path("/api/remote_files").method("get"
* @param writeable Whether to return only entries that can be written to.
* @param limit The maximum number of entries to return.
* @param offset The number of entries to skip before returning the rest.
* @param query The query string to filter the entries.
* @returns The list of files and directories from the server for the given URI.
*/
export async function browseRemoteFiles(
uri: string,
isRecursive = false,
writeable = false,
limit?: number,
offset?: number
offset?: number,
query?: string
): Promise<RemoteEntry[]> {
const { data } = await remoteFilesFetcher({ target: uri, recursive: isRecursive, writeable, limit, offset });
const { data } = await remoteFilesFetcher({ target: uri, recursive: isRecursive, writeable, limit, offset, query });
return data as RemoteEntry[];
}

Expand Down

0 comments on commit 8099e89

Please sign in to comment.