feat: update API paths to v1 and remove old path references for consistency

This commit is contained in:
riefive
2025-12-02 11:06:48 +07:00
parent be3f5c9d40
commit 297e16eaee
14 changed files with 15 additions and 41 deletions
+2 -2
View File
@@ -10,10 +10,10 @@ export default defineEventHandler(async (event) => {
const apiVclaim = config.public.VCLAIM
const apiVclaimSwagger = config.public.VCLAIM_SWAGGER
const pathname = url.pathname.replace(/^\/api/, '')
const isVclaim = pathname.includes('/vclaim')
const isVclaim = pathname.includes('/vclaim') && !pathname.includes('/vclaim-sep')
let targetUrl = apiOrigin + pathname + (url.search || '')
if (pathname.includes('/vclaim')) {
if (pathname.includes('/vclaim') && !pathname.includes('/vclaim-sep')) {
targetUrl = apiVclaim + pathname.replace('/vclaim', '') + (url.search || '')
}
if (pathname.includes('/vclaim-swagger')) {