Skip to content

Commit

Permalink
bug fix(frontend)
Browse files Browse the repository at this point in the history
  • Loading branch information
bekossy committed Dec 17, 2024
1 parent 5f4a7dc commit c8a3ace
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions agenta-web/src/hooks/useVaultSecret.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const useVaultSecret = () => {
const getVaultSecrets = async () => {
try {
if (isDemo()) {
const {fetchVaultSecret} = await import("@/services/vault/api")
const {fetchVaultSecret} = await import("@/services/vault/api"!)
const data = await fetchVaultSecret()

setSecrets((prevSecret) => {
Expand Down Expand Up @@ -46,8 +46,8 @@ export const useVaultSecret = () => {
const handleModifyVaultSecret = async (provider: LlmProvider) => {
try {
if (isDemo()) {
const {createVaultSecret, updateVaultSecret} = await import("@/services/vault/api")
const {SecretDTOKind, SecretDTOProvider} = await import("@/lib/types_ee")
const {createVaultSecret, updateVaultSecret} = await import("@/services/vault/api"!)
const {SecretDTOKind, SecretDTOProvider} = await import("@/lib/types_ee"!)

const envNameMap: Record<string, any> = {
OPENAI_API_KEY: SecretDTOProvider.OPENAI,
Expand Down Expand Up @@ -98,7 +98,7 @@ export const useVaultSecret = () => {
const handleDeleteVaultSecret = async (provider: LlmProvider) => {
try {
if (isDemo() && provider.id) {
const {deleteVaultSecret} = await import("@/services/vault/api")
const {deleteVaultSecret} = await import("@/services/vault/api"!)

await deleteVaultSecret({secret_id: provider.id})
await getVaultSecrets()
Expand Down

0 comments on commit c8a3ace

Please sign in to comment.