refactor: organize service dto contracts

This commit is contained in:
Yvan
2026-08-21 14:00:19 +08:00
parent e81a641953
commit d91f0554fd
65 changed files with 865 additions and 696 deletions
+8
View File
@@ -25,6 +25,14 @@ export const refundPaymentOrder = (data) => service({
})
export const testPaymentProvider = (provider) => service({
// The payment test route is registered at /payment/... (without the
// frontend /api proxy prefix). When the built UI is opened directly from
// the backend port, bypass axios' default /api baseURL for this request
// only. Vite/Nginx deployments continue to use the normal proxy path.
...(typeof window !== 'undefined' &&
String(window.location.port) === String(import.meta.env.VITE_SERVER_PORT || '8000')
? { baseURL: `${window.location.origin}/` }
: {}),
url: `/payment/providers/${encodeURIComponent(provider)}/test`,
method: 'post'
})