address breaking changes

This commit is contained in:
Thomas Ruoff
2022-03-14 22:35:30 +01:00
committed by Thomas Ruoff
parent 8222e04880
commit ef7f80fd92
10 changed files with 41 additions and 46 deletions

View File

@@ -3,14 +3,14 @@ import NextAuth from 'next-auth'
import EmailProvider from 'next-auth/providers/email'
import { MongoDBAdapter } from '@next-auth/mongodb-adapter'
import { MONGO_URI, MONGODB_OPTIONS } from '../../../db'
import { MONGO_URI } from '../../../db'
import { MongoClient } from 'mongodb'
let client: MongoClient
async function getMongoClient() {
if (!client) {
client = new MongoClient(MONGO_URI, MONGODB_OPTIONS)
client = new MongoClient(MONGO_URI)
await client.connect()
}