From f0c675d11a22b31984ceb0c6c60493eabb9d1be9 Mon Sep 17 00:00:00 2001 From: Ruslan Khafizov Date: Thu, 14 Nov 2024 11:02:53 +0800 Subject: [PATCH] Add flexible dev routing (#181) --- src/router/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index 41a688e..e4ca3c2 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -3,7 +3,7 @@ import store from '@/store/index.js'; const hostMap = { "dev": "https://cclaw.legalese.com/port/8090/workdir", - "prod": "https://prod.cclaw.legalese.com/port/8090", + "prod": "https://prod.cclaw.legalese.com/port/8090/workdir", "local": "http://localhost:8090/workdir" } @@ -18,7 +18,7 @@ const routes = [ component: () => import('@/views/Questions.vue'), alias: '/nl4eng/questions', beforeEnter: (to, from, next) => { - const host = hostMap[to.query.host]; + const host = hostMap[hostCode] ?? `https://${hostCode}.dev.cclaw.legalese.com/workdir`; fetch(`${host}/${to.query.uuid}/${to.query.spreadsheetId}/${to.query.sheetId}/aajson/LATEST.json`) .then(response => response.json()) .then(data => store.state.allInverviews = data);