diff --git a/client/lib/actions/user.actions.js b/client/lib/actions/user.actions.js index fa07d7a..ae3671d 100644 --- a/client/lib/actions/user.actions.js +++ b/client/lib/actions/user.actions.js @@ -12,7 +12,7 @@ import { dataURLtoBlob } from "../helpers/dataURLtoBlob"; import User from "../database/models/user.model"; export async function checkUser(email) { - connectToDatabase(); + await connectToDatabase(); console.log(email); diff --git a/client/lib/database/index.js b/client/lib/database/index.js index 2680c39..afbf605 100644 --- a/client/lib/database/index.js +++ b/client/lib/database/index.js @@ -15,7 +15,8 @@ export const connectToDatabase = async () => { cached.promise || mongoose.connect(MONGODB_URI, { dbName: "buzzys", - bufferCommands: false, + useNewUrlParser: true, + useUnifiedTopology: true, }); cached.conn = await cached.promise;