mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 21:40:31 +00:00
fix: requested changes
This commit is contained in:
@@ -15,14 +15,6 @@ const extractDetailsFromUrl = (router: NextRouter) => {
|
||||
|
||||
const idString = id as string;
|
||||
|
||||
if (!idString) {
|
||||
return {
|
||||
id: "",
|
||||
hashedHex: "",
|
||||
key: null
|
||||
};
|
||||
}
|
||||
|
||||
if (urlEncodedKey) {
|
||||
const [hashedHex, key] = urlEncodedKey ? urlEncodedKey.toString().split("-") : ["", ""];
|
||||
|
||||
@@ -33,13 +25,9 @@ const extractDetailsFromUrl = (router: NextRouter) => {
|
||||
};
|
||||
}
|
||||
|
||||
// get the first 36 characters as id and the rest as hex
|
||||
const idPart = idString.substring(0, 36);
|
||||
const hexPart = idString.substring(36);
|
||||
|
||||
return {
|
||||
id: idPart || "",
|
||||
hashedHex: hexPart || "",
|
||||
id: idString,
|
||||
hashedHex: null,
|
||||
key: null
|
||||
};
|
||||
};
|
||||
@@ -65,6 +53,9 @@ export const ViewSecretPublicPage = () => {
|
||||
((error as AxiosError)?.response?.data as { message: string })?.message ===
|
||||
"Invalid credentials";
|
||||
|
||||
console.log("data", fetchSecret);
|
||||
console.log("err", error);
|
||||
|
||||
const shouldShowPasswordPrompt =
|
||||
isInvalidCredential || (fetchSecret?.isPasswordProtected && !fetchSecret.secret);
|
||||
const isValidatingPassword = Boolean(password) && isFetching;
|
||||
|
||||
Reference in New Issue
Block a user