mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Use getUri from SDK
This commit is contained in:
parent
7cec3dfb53
commit
1e8ea6b7ee
3 changed files with 5 additions and 26 deletions
|
@ -1,17 +0,0 @@
|
|||
import type { Api } from '@jellyfin/sdk';
|
||||
|
||||
/**
|
||||
* Gets a full URI for a relative URL to the Jellyfin server for a given SDK Api instance.
|
||||
* TODO: Add to SDK
|
||||
* @param api - The Jellyfin SDK Api instance.
|
||||
* @param url - The relative URL.
|
||||
* @returns The complete URI with protocol, host, and base URL (if any).
|
||||
*/
|
||||
export const getUri = (url: string, api?: Api) => {
|
||||
if (!api) return;
|
||||
|
||||
return api.axiosInstance.getUri({
|
||||
baseURL: api.basePath,
|
||||
url
|
||||
});
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue