feat: Extend docker local setups, remove request URL from API composables

This commit is contained in:
2025-12-23 19:20:14 +01:00
parent 46d6431747
commit 805c66bc4f
11 changed files with 71 additions and 30 deletions

View File

@@ -13,11 +13,7 @@ export function useApplicationFormApi() {
const { serverApiBasePath, clientProxyBasePath } = useRuntimeConfig().public
const basePath = withoutTrailingSlash(
cleanDoubleSlashes(
import.meta.client
? appBaseUrl + clientProxyBasePath
: useRequestURL().origin + clientProxyBasePath + serverApiBasePath
)
cleanDoubleSlashes(import.meta.client ? appBaseUrl + clientProxyBasePath : clientProxyBasePath + serverApiBasePath)
)
const applicationFormApiClient = new ApplicationFormApi(

View File

@@ -8,11 +8,7 @@ export async function useApplicationFormTemplateApi() {
const { serverApiBasePath, clientProxyBasePath } = useRuntimeConfig().public
const basePath = withoutTrailingSlash(
cleanDoubleSlashes(
import.meta.client
? appBaseUrl + clientProxyBasePath
: useRequestURL().origin + clientProxyBasePath + serverApiBasePath
)
cleanDoubleSlashes(import.meta.client ? appBaseUrl + clientProxyBasePath : clientProxyBasePath + serverApiBasePath)
)
const applicationFormApiClient = new ApplicationFormTemplateApi(

View File

@@ -13,11 +13,7 @@ export function useApplicationFormVersionApi() {
const { serverApiBasePath, clientProxyBasePath } = useRuntimeConfig().public
const basePath = withoutTrailingSlash(
cleanDoubleSlashes(
import.meta.client
? appBaseUrl + clientProxyBasePath
: useRequestURL().origin + clientProxyBasePath + serverApiBasePath
)
cleanDoubleSlashes(import.meta.client ? appBaseUrl + clientProxyBasePath : clientProxyBasePath + serverApiBasePath)
)
const versionApiClient = new ApplicationFormVersionApi(

View File

@@ -7,11 +7,7 @@ export function useCommentApi() {
const { serverApiBasePath, clientProxyBasePath } = useRuntimeConfig().public
const basePath = withoutTrailingSlash(
cleanDoubleSlashes(
import.meta.client
? appBaseUrl + clientProxyBasePath
: useRequestURL().origin + clientProxyBasePath + serverApiBasePath
)
cleanDoubleSlashes(import.meta.client ? appBaseUrl + clientProxyBasePath : clientProxyBasePath + serverApiBasePath)
)
const commentApiClient = new CommentApi(

View File

@@ -13,11 +13,7 @@ export function useNotificationApi() {
const { serverApiBasePath, clientProxyBasePath } = useRuntimeConfig().public
const basePath = withoutTrailingSlash(
cleanDoubleSlashes(
import.meta.client
? appBaseUrl + clientProxyBasePath
: useRequestURL().origin + clientProxyBasePath + serverApiBasePath
)
cleanDoubleSlashes(import.meta.client ? appBaseUrl + clientProxyBasePath : clientProxyBasePath + serverApiBasePath)
)
const notificationApiClient = new NotificationApi(

View File

@@ -7,11 +7,7 @@ export function useUserApi() {
const { serverApiBasePath, clientProxyBasePath } = useRuntimeConfig().public
const basePath = withoutTrailingSlash(
cleanDoubleSlashes(
import.meta.client
? appBaseUrl + clientProxyBasePath
: useRequestURL().origin + clientProxyBasePath + serverApiBasePath
)
cleanDoubleSlashes(import.meta.client ? appBaseUrl + clientProxyBasePath : clientProxyBasePath + serverApiBasePath)
)
const userApiClient = new UserApi(new Configuration({ basePath, fetchApi: wrappedFetchWrap(useRequestFetch()) }))

View File

@@ -15,6 +15,7 @@ export default defineNuxtConfig({
clientSecret: 'NOT_SET',
realm: 'NOT_SET',
serverUrl: 'NOT_SET',
serverUrlInternal: 'NOT_SET',
redirectURL: 'NOT_SET',
scope: ['openid', 'organization']
}