Skip to content

Commit

Permalink
Add flexible dev routing (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
kharus authored Nov 14, 2024
1 parent 5be114a commit f0c675d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand All @@ -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);
Expand Down

0 comments on commit f0c675d

Please sign in to comment.