Escape vault name
This commit is contained in:
parent
d39a91b447
commit
8ef2f8c132
1 changed files with 15 additions and 17 deletions
|
|
@ -88,8 +88,7 @@ export class SyncService {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.logger.debug(
|
this.logger.debug(
|
||||||
`Created document ${JSON.stringify(result)} with id ${
|
`Created document ${JSON.stringify(result)} with id ${result.documentId
|
||||||
result.documentId
|
|
||||||
}`
|
}`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -140,8 +139,7 @@ export class SyncService {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.logger.debug(
|
this.logger.debug(
|
||||||
`Updated document ${JSON.stringify(result)} with id ${
|
`Updated document ${JSON.stringify(result)} with id ${result.documentId
|
||||||
result.documentId
|
|
||||||
}}`
|
}}`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -193,8 +191,7 @@ export class SyncService {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.logger.debug(
|
this.logger.debug(
|
||||||
`Updated document ${JSON.stringify(result)} with id ${
|
`Updated document ${JSON.stringify(result)} with id ${result.documentId
|
||||||
result.documentId
|
|
||||||
}}`
|
}}`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -325,7 +322,8 @@ export class SyncService {
|
||||||
private getUrl(path: string): string {
|
private getUrl(path: string): string {
|
||||||
const { vaultName, remoteUri } = this.settings.getSettings();
|
const { vaultName, remoteUri } = this.settings.getSettings();
|
||||||
const remoteUriWithoutTrailingSlash = remoteUri.replace(/\/+$/, "");
|
const remoteUriWithoutTrailingSlash = remoteUri.replace(/\/+$/, "");
|
||||||
return `${remoteUriWithoutTrailingSlash}/vaults/${vaultName}${path}`;
|
const encodedVaultName = encodeURIComponent(vaultName.trim());
|
||||||
|
return `${remoteUriWithoutTrailingSlash}/vaults/${encodedVaultName}${path}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
private getDefaultHeaders(
|
private getDefaultHeaders(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue