Good catches
This commit is contained in:
parent
0ab6984cdf
commit
debe7cfc37
14 changed files with 201 additions and 63 deletions
|
|
@ -17,6 +17,7 @@ import type { DocumentVersion } from "./types/DocumentVersion";
|
|||
import type { FetchLatestDocumentsResponse } from "./types/FetchLatestDocumentsResponse";
|
||||
import type { PingResponse } from "./types/PingResponse";
|
||||
import type { UpdateTextDocumentVersion } from "./types/UpdateTextDocumentVersion";
|
||||
import { buildVaultUrl } from "./build-vault-url";
|
||||
|
||||
export class SyncService {
|
||||
private readonly client: typeof globalThis.fetch;
|
||||
|
|
@ -385,10 +386,7 @@ export class SyncService {
|
|||
}
|
||||
|
||||
private getUrl(path: string): string {
|
||||
const { vaultName, remoteUri } = this.settings.getSettings();
|
||||
const remoteUriWithoutTrailingSlash = remoteUri.replace(/\/+$/, "");
|
||||
const encodedVaultName = encodeURIComponent(vaultName.trim());
|
||||
return `${remoteUriWithoutTrailingSlash}/vaults/${encodedVaultName}${path}`;
|
||||
return buildVaultUrl(this.settings, path);
|
||||
}
|
||||
|
||||
private getDefaultHeaders(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue