mirror of
https://github.com/umami-software/umami.git
synced 2026-02-05 21:27:20 +01:00
Added useFetch hook. Updated database check.
This commit is contained in:
parent
7a81dda7b6
commit
d0ca0819c6
14 changed files with 146 additions and 237 deletions
|
|
@ -5,8 +5,8 @@ const path = require('path');
|
|||
const databaseType =
|
||||
process.env.DATABASE_TYPE || (process.env.DATABASE_URL && process.env.DATABASE_URL.split(':')[0]);
|
||||
|
||||
if (!databaseType) {
|
||||
throw new Error('Database schema not specified');
|
||||
if (!databaseType || !['mysql', 'postgresql'].includes(databaseType)) {
|
||||
throw new Error('Missing or invalid database');
|
||||
}
|
||||
|
||||
console.log(`Database schema detected: ${databaseType}`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue