feat: integrate real backend API with centralized API client
- Add centralized apiPost() client (src/services/api.ts) that handles auth injection, error handling, and token expiry uniformly - Implement real authentication against /accounts/api/login/ and /logout/ - Rewrite partnerApi and userAppApi to use centralized client - Connect Partners page to /partner/list/ and /partner/create/ APIs - Add Vite proxy rules for /accounts/api and /partner endpoints - Update AuthUser type to match full backend user response - Move NuqsAdapter inside BrowserRouter for correct routing context Made-with: Cursor
This commit is contained in:
@@ -12,12 +12,20 @@ export default defineConfig(({ mode }) => ({
|
||||
overlay: false,
|
||||
},
|
||||
proxy: {
|
||||
// Proxy API requests to bypass CORS during development
|
||||
'/accounts/api': {
|
||||
target: 'http://0.0.0.0:8000',
|
||||
changeOrigin: true,
|
||||
secure: false,
|
||||
},
|
||||
'/partner': {
|
||||
target: 'http://0.0.0.0:8000',
|
||||
changeOrigin: true,
|
||||
secure: false,
|
||||
},
|
||||
'/api': {
|
||||
target: 'https://uat.eventifyplus.com',
|
||||
changeOrigin: true,
|
||||
secure: false,
|
||||
rewrite: (path) => path,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user