bleh commit

pull/13/head
TheCodedProf 3 years ago
parent f9baa95b10
commit 3ae9132266

@ -15,11 +15,9 @@ declare const config: {
password: string,
database: string,
host: string,
authSource: string
},
baseUrl: string,
pastebinApiKey: string,
pastebinUsername: string,
pastebinPassword: string,
rapidApiKey: string
};

@ -16,7 +16,7 @@ import defaultData from '../config/default.js';
// mongodb://emails:SweetLife2023!!@127.0.0.1:28180/saveEmail?retryWrites=true&w=majority
const username = encodeURIComponent(config.mongoOptions.username);
const password = encodeURIComponent(config.mongoOptions.password);
const mongoClient = new MongoClient(username ? `mongodb://${username}:${password}@${config.mongoOptions.host}?authMechanim=${config.mongoOptions.authMechanism || "DEFAULT"}` : `mongodb://${config.mongoOptions.host}`, {authSource: "admin"});
const mongoClient = new MongoClient(username ? `mongodb://${username}:${password}@${config.mongoOptions.host}?authMechanim=DEFAULT` : `mongodb://${config.mongoOptions.host}`, {authSource: "admin"});
await mongoClient.connect();
const database = mongoClient.db();

Loading…
Cancel
Save