path method

This commit is contained in:
Brandon Thomas committed 2026-05-08 21:54:52 -04:00
1 parent 72e052fe7e
commit 52fb116f3a
1 file changed
+6
@@ -39,6 +39,12 @@ export class StorytellerApiHostStore {
return instance;
}
/** Convert an API path to a full URL using the configured scheme and host. */
public pathToFullUrl(path: string): string {
const trimmedPath = path.startsWith("/") ? path.slice(1) : path;
return `${this.apiSchemeAndHost}/${trimmedPath}`;
}
/** Get the API scheme and host. */
public getApiSchemeAndHost(): string {
console.debug("StorytellerApiHostStore.getApiSchemeAndHost()", this.apiSchemeAndHost, this.constructor.name);