Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Should still pass data.include after fetching datalist

天舟9c7d37709317
diff --git a/frontend/src/store/modules/database.ts b/frontend/src/store/modules/database.ts
index 87482b54c4..4996b576cf 100644
--- a/frontend/src/store/modules/database.ts
+++ b/frontend/src/store/modules/database.ts
@@ -180,17 +180,19 @@ const getters = {
const actions = {
async fetchDatabaseList({ commit, rootGetters }: any) {
- // Unlike other list fetch, we don't fetch the instance and data source here.
+ // Unlike other list fetch, we don't fetch the data source here.
// As the sole purpose for the fetch here is to prepare the database info
- // itself (in particular the database name and project name) to be displayed in the task list
- // on the home page.
+ // itself (in particular the environment name, database name and project name)
+ // to be displayed in the task list on the home page.
// The data source contains sensitive connection credentials so we shouldn't
// return it unconditionally.
const data = (
- await axios.get(`/api/database?include=project,project.projectMember`)
+ await axios.get(
+ `/api/database?include=instance,project,project.projectMember`
+ )
).data;
const databaseList = data.data.map((database: ResourceObject) => {
- return convert(database, [], rootGetters);
+ return convert(database, data.included, rootGetters);
});
commit("upsertDatabaseList", { databaseList });