nice commit

pull/14/head
TheCodedProf 3 years ago
parent 7527657a82
commit 78b90332ba

@ -9,11 +9,11 @@ import defaultData from '../config/default.js';
const username = encodeURIComponent(config.mongoOptions.username);
const password = encodeURIComponent(config.mongoOptions.password);
const mongoClient = new MongoClient(username ? `mongodb://${username}:${password}@${config.mongoOptions.host}?authMechanism=DEFAULT` : `mongodb://${config.mongoOptions.host}`, {authSource: "admin"});
const mongoClient = new MongoClient(username ? `mongodb://${username}:${password}@${config.mongoOptions.host}?authMechanism=DEFAULT` : `mongodb://${config.mongoOptions.host}`, {authSource: config.mongoOptions.authSource});
await mongoClient.connect();
const database = mongoClient.db();
const collectionOptions = { authdb: "admin" };
const collectionOptions = { authdb: config.mongoOptions.authSource, w: "majority" };
const getIV = () => crypto.randomBytes(16);
export class Guilds {

Loading…
Cancel
Save