Fix OAuth: Add baseUrl getter to ApiClient
- OAuth login URLs need baseUrl without /api/v1 suffix - Added getter that derives baseUrl from getApiBaseUrl()
This commit is contained in:
@ -47,6 +47,10 @@ interface ApiError {
|
|||||||
class ApiClient {
|
class ApiClient {
|
||||||
private token: string | null = null
|
private token: string | null = null
|
||||||
|
|
||||||
|
get baseUrl(): string {
|
||||||
|
return getApiBaseUrl().replace('/api/v1', '')
|
||||||
|
}
|
||||||
|
|
||||||
setToken(token: string | null) {
|
setToken(token: string | null) {
|
||||||
this.token = token
|
this.token = token
|
||||||
if (token) {
|
if (token) {
|
||||||
|
|||||||
Reference in New Issue
Block a user