mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 06:27:11 +01:00
follow guidelines
This commit is contained in:
@@ -5,7 +5,7 @@ import GitHubProvider from 'next-auth/providers/github'
|
||||
|
||||
import { MongoDBAdapter } from '@next-auth/mongodb-adapter'
|
||||
import { MONGO_URI } from '../../../db'
|
||||
import { MongoClient } from 'mongodb'
|
||||
import { MongoClient, ServerApiVersion } from 'mongodb'
|
||||
|
||||
let client: MongoClient
|
||||
|
||||
@@ -14,7 +14,13 @@ const GITHUB_USERS_GRANTED = ['111471']
|
||||
|
||||
async function getMongoClient() {
|
||||
if (!client) {
|
||||
client = new MongoClient(MONGO_URI)
|
||||
client = new MongoClient(MONGO_URI, {
|
||||
serverApi: {
|
||||
version: ServerApiVersion.v1,
|
||||
strict: true,
|
||||
deprecationErrors: true,
|
||||
}
|
||||
})
|
||||
await client.connect()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user