fix(frontend): SSR of create.vue working, add .vscode launch.json, fix launch.json bug due to typescript in nuxt.config.ts
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import { ApplicationFormApi, Configuration } from '../.api-client'
|
||||
import type { CreateApplicationFormDto, ApplicationFormDto, PagedApplicationFormDto } from '~/.api-client'
|
||||
import { cleanDoubleSlashes } from 'ufo'
|
||||
import { cleanDoubleSlashes, withoutTrailingSlash } from 'ufo'
|
||||
|
||||
export function useApplicationFormApi() {
|
||||
const appBaseUrl = useRuntimeConfig().app.baseURL
|
||||
const { serverApiBaseUrl, serverApiBasePath, clientProxyBasePath } = useRuntimeConfig().public
|
||||
|
||||
const basePath = cleanDoubleSlashes(
|
||||
import.meta.client ? appBaseUrl + clientProxyBasePath : serverApiBaseUrl + serverApiBasePath
|
||||
const basePath = withoutTrailingSlash(
|
||||
cleanDoubleSlashes(import.meta.client ? appBaseUrl + clientProxyBasePath : serverApiBaseUrl + serverApiBasePath)
|
||||
)
|
||||
|
||||
const applicationFormApiClient = new ApplicationFormApi(new Configuration({ basePath }))
|
||||
|
||||
Reference in New Issue
Block a user