prettier all the things

This commit is contained in:
Thomas Ruoff
2022-02-19 23:18:49 +01:00
committed by Thomas Ruoff
parent c35d3009c6
commit 36f8719531
28 changed files with 433 additions and 428 deletions

View File

@@ -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,
}),
],
})
}