diff --git a/src/ui/pages/pageLinks.tsx b/src/ui/pages/pageLinks.tsx index 4a62fce..9e5200c 100644 --- a/src/ui/pages/pageLinks.tsx +++ b/src/ui/pages/pageLinks.tsx @@ -25,15 +25,15 @@ export function kvDeleteURL( secret: string, version = "null", ): string { - return `/secrets/kv/delete/${secret}/${version}/${baseMount}/${kvJoinSecretPath(secretPath)}`; + return kvRemoveEndSlash(`/secrets/kv/delete/${secret}/${version}/${baseMount}/${kvJoinSecretPath(secretPath)}`); } export function kvEditURL(baseMount: string, secretPath: string[], secret: string): string { - return `/secrets/kv/edit/${secret}/${baseMount}/${kvJoinSecretPath(secretPath)}`; + return kvRemoveEndSlash(`/secrets/kv/edit/${secret}/${baseMount}/${kvJoinSecretPath(secretPath)}`); } export function kvVersionsURL(baseMount: string, secretPath: string[], secret: string): string { - return `/secrets/kv/versions/${secret}/${baseMount}/${kvJoinSecretPath(secretPath)}`; + return kvRemoveEndSlash(`/secrets/kv/versions/${secret}/${baseMount}/${kvJoinSecretPath(secretPath)}`); } export function kvViewURL( @@ -46,7 +46,7 @@ export function kvViewURL( } export function kvListURL(baseMount: string, secretPath: string[]): string { - return `/secrets/kv/list/${baseMount}/${kvJoinSecretPath(secretPath)}`; + return kvRemoveEndSlash(`/secrets/kv/list/${baseMount}/${kvJoinSecretPath(secretPath)}`); } // Secrets / TOTP