refactor(ui): url builders for each router

The MM2 router is at `api/v2/models`. URL builder utils make this a bit easier to manage.
This commit is contained in:
psychedelicious
2024-02-16 21:57:30 +11:00
parent dab939f7d1
commit db363b5178
12 changed files with 177 additions and 102 deletions

View File

@ -76,9 +76,9 @@ export default defineConfig(({ mode }) => {
changeOrigin: true,
},
// proxy nodes api
'/api/v1': {
target: 'http://127.0.0.1:9090/api/v1',
rewrite: (path) => path.replace(/^\/api\/v1/, ''),
'/api/': {
target: 'http://127.0.0.1:9090/api/',
rewrite: (path) => path.replace(/^\/api/, ''),
changeOrigin: true,
},
},