0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00

Refactored database check to use utility

refs https://github.com/TryGhost/Toolbox/issues/213

- this removes another hardcoded string check that would have been
  incorrect when we switch the sqlite client to better-sqlite3
This commit is contained in:
Daniel Lockyer 2022-03-28 16:12:32 +01:00
parent bf6188e331
commit 65fa8c12b5
No known key found for this signature in database
GPG key ID: D21186F0B47295AD

View file

@ -19,6 +19,7 @@ const VerificationTrigger = require('@tryghost/verification-trigger');
const DomainEvents = require('@tryghost/domain-events');
const {LastSeenAtUpdater} = require('@tryghost/members-events-service');
const events = require('../../lib/common/events');
const DatabaseInfo = require('@tryghost/database-info');
const messages = {
noLiveKeysInDevelopment: 'Cannot use live stripe keys in development. Please restart in production mode.',
@ -37,7 +38,7 @@ const membersConfig = new MembersConfigProvider({
const membersStats = new MembersStats({
db: db,
settingsCache: settingsCache,
isSQLite: config.get('database:client') === 'sqlite3'
isSQLite: DatabaseInfo.isSQLite(db.knex)
});
let membersApi;