mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-16 06:58:46 +00:00
프론트엔드에서의 암호 키 관련된 변수 이름 리팩토링
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
import { TitleDiv, BottomDiv } from "$lib/components/divs";
|
||||
import { TextInput } from "$lib/components/inputs";
|
||||
import { refreshToken } from "$lib/hooks/callAPI";
|
||||
import { keyPairsStore } from "$lib/stores";
|
||||
import { clientKeyStore } from "$lib/stores";
|
||||
import { requestLogin, requestTokenUpgrade } from "./service";
|
||||
|
||||
let { data } = $props();
|
||||
@@ -19,14 +19,11 @@
|
||||
try {
|
||||
if (!(await requestLogin(email, password))) throw new Error("Failed to login");
|
||||
|
||||
if (
|
||||
$keyPairsStore &&
|
||||
!(await requestTokenUpgrade($keyPairsStore.encKeyPair, $keyPairsStore.sigKeyPair))
|
||||
)
|
||||
if ($clientKeyStore && !(await requestTokenUpgrade($clientKeyStore)))
|
||||
throw new Error("Failed to upgrade token");
|
||||
|
||||
await goto(
|
||||
$keyPairsStore
|
||||
$clientKeyStore
|
||||
? data.redirectPath
|
||||
: "/key/generate?redirect=" + encodeURIComponent(data.redirectPath),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user