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

@@ -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()