small updates

This commit is contained in:
2022-05-06 12:39:07 +02:00
parent 3ab4eabf9b
commit c56b42feea
4 changed files with 7 additions and 4 deletions

View File

@@ -6,5 +6,8 @@ module.exports = {
extends: ['plugin:vue/vue3-essential', 'eslint:recommended', '@vue/eslint-config-prettier'],
env: {
'vue/setup-compiler-macros': true
},
rules: {
'vue/multi-word-component-names': 'off'
}
}

View File

@@ -1,7 +1,7 @@
FROM node:16-slim
WORKDIR /app
COPY package*.json ./
RUN npm install
RUN npm ci
COPY . .
RUN npm run build --modern
RUN npm run build
CMD ["node", "server"]

View File

@@ -37,7 +37,8 @@ export default {
try {
const [start, end] = [window.value.getStart(), window.value.getEnd()]
const sample = Math.round((end - start) / 60 / 288) || 1
const host = process.env.NODE_ENV === 'development' ? 'http://localhost:3000' : ''
console.log(import.meta.env.MODE)
const host = import.meta.env.MODE === 'development' ? 'http://localhost:3000' : ''
const fetchUrl = `${host}/type/${typeApi[type.value]}/startDate/${start}/endDate/${end}/sample/${sample}`
const response = await fetch(fetchUrl)
data.value = await response.json()

View File

@@ -27,7 +27,6 @@ export default {
const currentRoute = router.currentRoute
if (currentRoute.value.params.type) type.value = currentRoute.value.params.type
if (currentRoute.value.params.window) window.value = { label: currentRoute.value.params.window }
console.log(type.value, window.value)
const updateRoute = () => {
if (type.value) {
const route = {