Skip to content

Commit e1901aa

Browse files
committed
modify config validation
1 parent a3dd32d commit e1901aa

File tree

71 files changed

+4055
-421
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+4055
-421
lines changed

bin/utils/validation.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ export function validateMongoURI(uri) {
77
}
88

99
export function isConfigValid(config) {
10-
if (!config || typeof config !== 'object') return false;
10+
if (!config || typeof config !== 'object') {
11+
console.error('Configuration is invalid: - not object - ', config);
12+
13+
return false;
14+
}
1115

1216
// Check MongoDB configuration
1317
if (!config.mongoUrl || !config.database || !config.collection) return false;

0 commit comments

Comments
 (0)