Fix CLI issue

This commit is contained in:
x032205
2025-06-19 17:17:10 -04:00
parent 66140dc151
commit 73fe2659b5
5 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ import "time"
type UserCredentials struct { type UserCredentials struct {
Email string `json:"email"` Email string `json:"email"`
PrivateKey string `json:"privateKey"` PrivateKey string `json:"privateKey"`
JWTToken string `json:"JWTToken"` JWTToken string `json:"JTWToken"`
RefreshToken string `json:"refreshToken"` RefreshToken string `json:"refreshToken"`
} }
@@ -16,7 +16,7 @@ export interface IsCliLoginSuccessful {
loginResponse?: { loginResponse?: {
email: string; email: string;
privateKey: string; privateKey: string;
JWTToken: string; JTWToken: string;
}; };
success: boolean; success: boolean;
} }
@@ -131,7 +131,7 @@ const attemptLogin = async ({
loginResponse: { loginResponse: {
email, email,
privateKey, privateKey,
JWTToken: token JTWToken: token
}, },
success: true success: true
}); });
@@ -14,7 +14,7 @@ interface IsMfaLoginSuccessful {
success: boolean; success: boolean;
loginResponse: { loginResponse: {
privateKey: string; privateKey: string;
JWTToken: string; JTWToken: string;
}; };
} }
@@ -95,7 +95,7 @@ const attemptLoginMfa = async ({
success: true, success: true,
loginResponse: { loginResponse: {
privateKey, privateKey,
JWTToken: token JTWToken: token
} }
}); });
} catch (err) { } catch (err) {
@@ -96,7 +96,7 @@ export const PasswordStep = ({
const payload = { const payload = {
privateKey, privateKey,
email, email,
JWTToken: token, JTWToken: token,
refreshToken refreshToken
}; };
await instance.post(cliUrl, payload).catch(() => { await instance.post(cliUrl, payload).catch(() => {
@@ -209,7 +209,7 @@ export const PasswordStep = ({
const instance = axios.create(); const instance = axios.create();
const payload = { const payload = {
...isCliLoginSuccessful.loginResponse, ...isCliLoginSuccessful.loginResponse,
JWTToken: token, JTWToken: token,
refreshToken refreshToken
}; };
await instance.post(cliUrl, payload).catch(() => { await instance.post(cliUrl, payload).catch(() => {
@@ -149,7 +149,7 @@ export const SelectOrganizationSection = () => {
} }
const payload = { const payload = {
JWTToken: token, JTWToken: token,
email: user?.email, email: user?.email,
privateKey, privateKey,
refreshToken refreshToken