|
|
@@ -28,7 +28,7 @@ export default (langName, lang) => new Elysia({ prefix: `/history` })
|
|
|
}
|
|
|
|
|
|
set.headers['content-type'] = 'text/html; charset=utf8'
|
|
|
- return eta.render(`${langName}/history/property`, { lang, dateMap: { years, months, days }, type: `daily`, property, data })
|
|
|
+ return eta.render(`${langName}/history/property`, { lang, dateMap: { years, months, days, raw: dateMap }, type: `daily`, property, data })
|
|
|
})
|
|
|
.get(`/:property/daily`, ({ params: { property }, query: { day, month, year }, set }) => {
|
|
|
const dateMap = Meteostanica.getDateMap()
|
|
|
@@ -49,7 +49,7 @@ export default (langName, lang) => new Elysia({ prefix: `/history` })
|
|
|
}
|
|
|
|
|
|
set.headers['content-type'] = 'text/html; charset=utf8'
|
|
|
- return eta.render(`${langName}/history/property`, { lang, dateMap: { years, months, days }, type: `daily`, property, data })
|
|
|
+ return eta.render(`${langName}/history/property`, { lang, dateMap: { years, months, days, raw: dateMap }, type: `daily`, property, data })
|
|
|
})
|
|
|
.get(`/:property/monthly`, ({ params: { property }, query: { month, year }, set }) => {
|
|
|
const dateMap = Meteostanica.getDateMap()
|
|
|
@@ -68,7 +68,7 @@ export default (langName, lang) => new Elysia({ prefix: `/history` })
|
|
|
}
|
|
|
|
|
|
set.headers['content-type'] = 'text/html; charset=utf8'
|
|
|
- return eta.render(`${langName}/history/property`, { lang, dateMap: { years, months }, type: `monthly`, property, data })
|
|
|
+ return eta.render(`${langName}/history/property`, { lang, dateMap: { years, months, raw: dateMap }, type: `monthly`, property, data })
|
|
|
})
|
|
|
.get(`/:property/yearly`, ({ params: { property }, query: { year }, set }) => {
|
|
|
const dateMap = Meteostanica.getDateMap()
|
|
|
@@ -85,7 +85,7 @@ export default (langName, lang) => new Elysia({ prefix: `/history` })
|
|
|
}
|
|
|
|
|
|
set.headers['content-type'] = 'text/html; charset=utf8'
|
|
|
- return eta.render(`${langName}/history/property`, { lang, dateMap: { years }, type: `yearly`, property, data })
|
|
|
+ return eta.render(`${langName}/history/property`, { lang, dateMap: { years, raw: dateMap }, type: `yearly`, property, data })
|
|
|
})
|
|
|
.get(`/:property/allTime`, ({ params: { property }, set }) => {
|
|
|
const data = Meteostanica.getDataPropertyAllTime(property)
|
|
|
@@ -97,5 +97,5 @@ export default (langName, lang) => new Elysia({ prefix: `/history` })
|
|
|
}
|
|
|
|
|
|
set.headers['content-type'] = 'text/html; charset=utf8'
|
|
|
- return eta.render(`${langName}/history/property`, { lang, dateMap, type: `allTime`, property, data })
|
|
|
+ return eta.render(`${langName}/history/property`, { lang, dateMap: { raw: dateMap }, type: `allTime`, property, data })
|
|
|
})
|