mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Update database detection.
This commit is contained in:
parent
07cc61f5c3
commit
7a81dda7b6
3 changed files with 6 additions and 3 deletions
|
|
@ -95,7 +95,6 @@ export function getDateArray(data, startDate, endDate, unit) {
|
|||
const arr = [];
|
||||
const [diff, add, normalize] = dateFuncs[unit];
|
||||
const n = diff(endDate, startDate) + 1;
|
||||
console.log({ startDate, endDate, n });
|
||||
|
||||
function findData(t) {
|
||||
const x = data.find(e => {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,10 @@ const POSTGRESQL_DATE_FORMATS = {
|
|||
};
|
||||
|
||||
export function getDatabase() {
|
||||
return process.env.DATABASE_TYPE || process.env.DATABASE_URL.split(':')[0];
|
||||
return (
|
||||
process.env.DATABASE_TYPE ||
|
||||
(process.env.DATABASE_URL && process.env.DATABASE_URL.split(':')[0])
|
||||
);
|
||||
}
|
||||
|
||||
export function getDateQuery(db, field, unit, timezone) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue