feat: add scoped tenant api keys

This commit is contained in:
wizardchen
2026-07-05 10:25:37 +08:00
committed by lyingbug
parent 1708d6895a
commit 505bc7ddec
49 changed files with 2899 additions and 1578 deletions
+7 -4
View File
@@ -130,8 +130,13 @@ const router = createRouter({
},
{
path: "integrations",
name: "integrations",
component: () => import("../views/platform/RoutePlaceholder.vue"),
redirect: (to) => ({
path: "/platform/settings",
query: {
...to.query,
section: "integrations",
},
}),
meta: { requiresInit: true, requiresAuth: true }
},
{
@@ -203,7 +208,6 @@ function persistLoginResponse(authStore: ReturnType<typeof useAuthStore>, respon
authStore.setTenant({
id: String(response.tenant.id) || '',
name: response.tenant.name || '',
api_key: response.tenant.api_key || '',
owner_id: response.user.id || '',
created_at: response.tenant.created_at || new Date().toISOString(),
updated_at: response.tenant.updated_at || new Date().toISOString()
@@ -238,7 +242,6 @@ async function hydrateSessionFromToken(authStore: ReturnType<typeof useAuthStore
authStore.setTenant({
id: String(tenant.id) || '',
name: tenant.name || '',
api_key: tenant.api_key || '',
owner_id: tenant.owner_id || user.id || '',
description: tenant.description,
status: tenant.status,