From 4bfbe3ad36627124fea71f0d416edebee7159fa7 Mon Sep 17 00:00:00 2001 From: Yves Gugger Date: Tue, 9 Dec 2025 18:03:15 +0100 Subject: [PATCH] Fix OAuth: Add baseUrl getter to ApiClient - OAuth login URLs need baseUrl without /api/v1 suffix - Added getter that derives baseUrl from getApiBaseUrl() --- frontend/src/lib/api.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/lib/api.ts b/frontend/src/lib/api.ts index 7f6714e..a915cee 100644 --- a/frontend/src/lib/api.ts +++ b/frontend/src/lib/api.ts @@ -46,6 +46,10 @@ interface ApiError { class ApiClient { private token: string | null = null + + get baseUrl(): string { + return getApiBaseUrl().replace('/api/v1', '') + } setToken(token: string | null) { this.token = token