Merge pull request #71 from HipsterBrown/update-get-database

Update getDatabase to lookup DATABASE_TYPE env
This commit is contained in:
Mike Cao 2020-08-26 20:40:47 -07:00 committed by GitHub
commit 2910eb5c2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,7 @@ const POSTGRESQL = 'postgresql';
const MYSQL = 'mysql';
export function getDatabase() {
return process.env.DATABASE_URL.split(':')[0];
return process.env.DATABASE_TYPE || process.env.DATABASE_URL.split(':')[0];
}
export async function getWebsiteById(website_id) {