From e49e04c56aa0d854c4df142e89289258dfbe7f2e Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Tue, 2 Apr 2024 09:33:27 -0700 Subject: [PATCH] chore: formatting --- src/lib/apis/auths/index.ts | 6 +-- .../components/chat/Settings/Account.svelte | 43 ++++++++++++------- 2 files changed, 31 insertions(+), 18 deletions(-) diff --git a/src/lib/apis/auths/index.ts b/src/lib/apis/auths/index.ts index a690a476b..b703e8746 100644 --- a/src/lib/apis/auths/index.ts +++ b/src/lib/apis/auths/index.ts @@ -342,7 +342,7 @@ export const createApiKey = async (token: string) => { throw error; } return res; -} +}; export const getApiKey = async (token: string) => { let error = null; @@ -367,7 +367,7 @@ export const getApiKey = async (token: string) => { throw error; } return res; -} +}; export const deleteApiKey = async (token: string) => { let error = null; @@ -392,4 +392,4 @@ export const deleteApiKey = async (token: string) => { throw error; } return res; -} +}; diff --git a/src/lib/components/chat/Settings/Account.svelte b/src/lib/components/chat/Settings/Account.svelte index fbb5e6289..f368d90f9 100644 --- a/src/lib/components/chat/Settings/Account.svelte +++ b/src/lib/components/chat/Settings/Account.svelte @@ -17,7 +17,7 @@ let name = ''; let showJWTToken = false; let JWTTokenCopied = false; - let showApiKey= false; + let showApiKey = false; let ApiKeyCopied = false; let localApiKey = localStorage.apiKey; let profileImageInputElement: HTMLInputElement; @@ -39,12 +39,11 @@ const createApiKeyHandler = async () => { const apiKey = await createApiKey(localStorage.token); if (apiKey) { - localApiKey = apiKey["api_key"]; + localApiKey = apiKey['api_key']; localStorage.apiKey = localApiKey; toast.success($i18n.t('API Key created.')); } else { toast.error($i18n.t('Failed to create API Key.')); - } }; @@ -186,9 +185,9 @@
-
+
-
{$i18n.t('JWT Token')}
+
{$i18n.t('JWT Token')}
@@ -285,9 +284,9 @@
-
+
-
{$i18n.t('API Key')}
+
{$i18n.t('API Key')}
@@ -299,14 +298,6 @@ disabled /> - - + +