From fafbfdf2cdf4005a410a6afb5d0a9201aab3db1e Mon Sep 17 00:00:00 2001 From: simonredfern Date: Thu, 8 Oct 2026 00:15:22 +0200 Subject: [PATCH 1/2] Register --- src/routes/+page.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index b324f6c..752da76 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -58,7 +58,7 @@ { href: data.portalUrl, icon: Globe, - title: 'Portal', + title: 'Register', description: 'Register, get API keys and read the guides.' }, { From 0052b9c12c8d463fdcdabe03f5ff40c3db9cf621 Mon Sep 17 00:00:00 2001 From: simonredfern Date: Thu, 8 Oct 2026 22:16:42 +0200 Subject: [PATCH 2/2] improve link to API Explorer --- src/routes/+page.server.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/routes/+page.server.ts b/src/routes/+page.server.ts index 4f959b1..8ef3c84 100644 --- a/src/routes/+page.server.ts +++ b/src/routes/+page.server.ts @@ -1,4 +1,5 @@ import type { PageServerLoad } from './$types'; +import { ENTITY_SPACE_ID } from '$lib/constants/entities'; import { API_EXPLORER_URL, API_MANAGER_URL, @@ -8,13 +9,23 @@ import { getAppDirectory } from '$lib/obp/appDirectory'; +/** API Explorer opened on this deployment's dynamic endpoints, scoped to the bank + * that owns them (OBP_ENTITY_SPACE_ID). System level entities have no bank, so no bank_id. */ +function apiExplorerLink(baseUrl: string, bankId: string | null): string { + const url = new URL(baseUrl); + url.searchParams.set('content', 'dynamic'); + if (bankId) url.searchParams.set('bank_id', bankId); + return url.toString(); +} + /** The OBP tools linked below the fold, located through OBP's app directory. A tool * OBP has no URL for is null, and its card is left out. */ export const load: PageServerLoad = async ({ fetch }) => { const directory = await getAppDirectory(fetch); const portalUrl = directory[PORTAL_URL]; + const apiExplorerUrl = directory[API_EXPLORER_URL]; return { - apiExplorerUrl: directory[API_EXPLORER_URL] ?? null, + apiExplorerUrl: apiExplorerUrl ? apiExplorerLink(apiExplorerUrl, ENTITY_SPACE_ID) : null, apiManagerUrl: directory[API_MANAGER_URL] ?? null, mcpUrl: directory[MCP_URL] ?? null, portalUrl: portalUrl ?? null,