mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 22:47:15 +01:00
prettier all the things
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
import { NextApiRequest, NextApiResponse } from 'next'
|
||||
import NextAuth from "next-auth"
|
||||
import EmailProvider from "next-auth/providers/email"
|
||||
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 { MongoClient } from "mongodb";
|
||||
import { MongoDBAdapter } from '@next-auth/mongodb-adapter'
|
||||
import { MONGO_URI, MONGODB_OPTIONS } from '../../../db'
|
||||
import { MongoClient } from 'mongodb'
|
||||
|
||||
let client: MongoClient;
|
||||
let client: MongoClient
|
||||
|
||||
async function getMongoClient() {
|
||||
if (!client) {
|
||||
client = new MongoClient(MONGO_URI, MONGODB_OPTIONS);
|
||||
await client.connect();
|
||||
client = new MongoClient(MONGO_URI, MONGODB_OPTIONS)
|
||||
await client.connect()
|
||||
}
|
||||
|
||||
return client;
|
||||
return client
|
||||
}
|
||||
|
||||
export default async function auth(req: NextApiRequest, res: NextApiResponse) {
|
||||
@@ -24,17 +24,15 @@ export default async function auth(req: NextApiRequest, res: NextApiResponse) {
|
||||
providers: [
|
||||
EmailProvider({
|
||||
server: {
|
||||
host: "smtp.sendgrid.net",
|
||||
host: 'smtp.sendgrid.net',
|
||||
port: 587,
|
||||
auth: {
|
||||
user: "apikey",
|
||||
user: 'apikey',
|
||||
pass: process.env.SENDGRID_API_KEY,
|
||||
},
|
||||
},
|
||||
from: process.env.FROM_EMAIL
|
||||
from: process.env.FROM_EMAIL,
|
||||
}),
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user