mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add JSDoc comment to getItems helper
In return the comments at each usage are removed.
This commit is contained in:
parent
d8bbba2dc9
commit
06c4f0f258
5 changed files with 8 additions and 8 deletions
|
@ -49,6 +49,14 @@ function mergeResults(results: BaseItemDtoQueryResult[]) {
|
|||
return merged;
|
||||
}
|
||||
|
||||
/**
|
||||
* Transparently handles the call to apiClient.getItems splitting the
|
||||
* call into multiple ones if the URL might get too long.
|
||||
* @param apiClient The ApiClient to use
|
||||
* @param userId User id to pass to actual getItems call
|
||||
* @param options Options object to specify getItems option. This includes a possibly long Items list that will be split up.
|
||||
* @returns A promise that resolves to the merged result of all getItems calls
|
||||
*/
|
||||
export function getItems(apiClient: ApiClient, userId: string, options?: any) {
|
||||
if (options.Ids?.split(',').length <= ITEMS_PER_REQUEST_LIMIT) {
|
||||
return apiClient.getItems(apiClient.getCurrentUserId(), options);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue