Files
ComfyUI-Lora-Manager/vue-widgets/src/utils/basePath.ts
T

9 lines
242 B
TypeScript

export function getLmBasePath(): string {
const { pathname } = window.location;
return pathname.endsWith('/') ? pathname.slice(0, -1) : pathname;
}
export function lmApiUrl(path: string): string {
return `${getLmBasePath()}${path}`;
}