Skip to content

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

chore: fix route params (#11384)

Liu Jif73f14beed19
diff --git a/frontend/src/router/dashboard/projectV1.ts b/frontend/src/router/dashboard/projectV1.ts
index 5610cb146d..6cebc4a874 100644
--- a/frontend/src/router/dashboard/projectV1.ts
+++ b/frontend/src/router/dashboard/projectV1.ts
@@ -447,7 +447,13 @@ const projectV1Routes: RouteRecordRaw[] = [
],
},
component: () => import("@/views/ChangeHistoryDetail.vue"),
- props: true,
+ props: (route) => ({
+ ...route.params,
+ project: `projects/${route.params.projectId}`,
+ instance: `instances/${route.params.instanceId}`,
+ database: `instances/${route.params.instanceId}/databases/${route.params.databaseName}`,
+ changeHistoryId: route.params.changeHistoryId,
+ }),
},
],
},
diff --git a/frontend/src/views/ChangeHistoryDetail.vue b/frontend/src/views/ChangeHistoryDetail.vue
index bf7110c18f..cf126c957c 100644
--- a/frontend/src/views/ChangeHistoryDetail.vue
+++ b/frontend/src/views/ChangeHistoryDetail.vue
@@ -435,18 +435,16 @@ const showSchemaSnapshot = computed(() => {
});
watch(
- () => [changeHistoryParent.value, changeHistoryName.value],
- async () => {
- const database = await databaseStore.getOrFetchDatabaseByName(
- changeHistoryParent.value
- );
+ [changeHistoryParent, changeHistoryName],
+ async ([parent, name]) => {
+ const database = await databaseStore.getOrFetchDatabaseByName(parent);
await Promise.all([
dbSchemaStore.getOrFetchDatabaseMetadata({
database: database.name,
skipCache: false,
}),
changeHistoryStore.getOrFetchChangeHistoryByName(
- changeHistoryName.value,
+ name,
ChangeHistoryView.CHANGE_HISTORY_VIEW_FULL
),
]);