Skip to content

Commit 7105903

Browse files
committed
fix some small issues
1 parent 32f506d commit 7105903

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

console/atest-ui/src/views/store.ts

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2023-2024 API Testing Authors.
2+
Copyright 2023-2025 API Testing Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -28,6 +28,30 @@ export interface Store {
2828
params: Pair[];
2929
}
3030

31+
const ExtensionKindGit = "atest-store-git"
32+
const ExtensionKindS3 = "atest-store-s3"
33+
const ExtensionKindORM = "atest-store-orm"
34+
const ExtensionKindIotDB = "atest-store-iotdb"
35+
const ExtensionKindCassandra = "atest-store-cassandra"
36+
const ExtensionKindEtcd = "atest-store-etcd"
37+
const ExtensionKindRedis = "atest-store-redis"
38+
const ExtensionKindMongoDB = "atest-store-mongodb"
39+
const ExtensionKindElasticsearch = "atest-store-elasticsearch"
40+
const ExtensionKindOpengeMini = "atest-store-opengemini"
41+
42+
export const ExtensionKind = {
43+
ExtensionKindGit,
44+
ExtensionKindS3,
45+
ExtensionKindORM,
46+
ExtensionKindIotDB,
47+
ExtensionKindCassandra,
48+
ExtensionKindEtcd,
49+
ExtensionKindRedis,
50+
ExtensionKindMongoDB,
51+
ExtensionKindElasticsearch,
52+
ExtensionKindOpengeMini
53+
}
54+
3155
const MySQL = "mysql";
3256
const Postgres = "postgres";
3357
const SQLite = "sqlite";
@@ -50,10 +74,13 @@ export const Driver = {
5074

5175
export async function SupportedExtensions() {
5276
const kinds = await API.GetStoreKinds()
53-
return kinds.data
77+
if (kinds) {
78+
return kinds.data
79+
}
80+
return []
5481
}
5582

5683
export async function SupportedExtension(name: string) {
5784
const storeExtensions = await SupportedExtensions()
58-
return storeExtensions.find(e => e.name === name)
85+
return storeExtensions.find((e: Store) => e.name === name)
5986
}

0 commit comments

Comments
 (0)