feat: add scoped tenant api keys
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user