Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Update API URLs
Leendert de Borst2e9396790d5d
diff --git a/apps/server/AliasVault.Api/Controllers/V2/VaultKeyController.cs b/apps/server/AliasVault.Api/Controllers/V2/VaultKeyController.csindex b3ac41b79..6b11d45a6 100644--- a/apps/server/AliasVault.Api/Controllers/V2/VaultKeyController.cs+++ b/apps/server/AliasVault.Api/Controllers/V2/VaultKeyController.cs@@ -30,7 +30,11 @@ public class VaultKeyController(IAliasServerDbContextFactory dbContextFactory, U/// </summary>/// <param name="type">The unlock method type, e.g. "password".</param>/// <returns>The vault key envelope DTO.</returns>- [HttpGet("{type}")]+ // Served under two routes while the rename from "vault key" to "unlock method" rolls out:+ // - v2/UnlockMethod/{type}: the new route, added in 0.32.0. Clients can switch to it once their minimum server version is 0.32.0 or higher.+ // - v2/VaultKey/{type}: deprecated since 0.32.0. Remove it (and rename this controller) once AppInfo.MinimumClientVersion only allows clients that use the new route.+ [HttpGet("~/v{version:apiVersion}/VaultKey/{type}")]+ [HttpGet("~/v{version:apiVersion}/UnlockMethod/{type}")]public async Task<IActionResult> Get(string type){await using var context = await dbContextFactory.CreateDbContextAsync();diff --git a/core/client/src/auth/VaultKeyService.ts b/core/client/src/auth/VaultKeyService.tsindex 818c34a0c..84f366c16 100644--- a/core/client/src/auth/VaultKeyService.ts+++ b/core/client/src/auth/VaultKeyService.ts@@ -46,6 +46,7 @@ export class VaultKeyService {public static async fetchVaultKey(webApi?: WebApiService): Promise<FetchVaultKeyResult> {const api = webApi ?? new WebApiService();try {+ // TODO: switch to `UnlockMethod/${UnlockMethodType.Password}` after minimum API is 0.32.0+ that has the new URL.const response = await api.get<VaultKeyGetResponse>(`VaultKey/${UnlockMethodType.Password}`);return { supported: true, vaultKey: response.vaultKey ?? null };} catch (e) {diff --git a/core/rust/src/vault_sync/http.rs b/core/rust/src/vault_sync/http.rsindex 9bfc6a6af..28cda9e54 100644--- a/core/rust/src/vault_sync/http.rs+++ b/core/rust/src/vault_sync/http.rs@@ -115,6 +115,7 @@ pub(crate) async fn post_frame<B: FrameBody + Serialize, T: DeserializeOwned>(hopub(crate) const VAULT_ENDPOINT: &str = "Vault";/// The v2 vault key endpoint (`GET v2/VaultKey/Password`): the account's password-wrapped key chain.+// TODO: switch to "UnlockMethod/Password" after minimum API is 0.32.0+ that has the new URL.pub(crate) const VAULT_KEY_PASSWORD_ENDPOINT: &str = "VaultKey/Password";/// Max ciphertext bytes in one blob transfer request or response body.