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

@@ -38,7 +38,7 @@ function ShowBookingAdmin({ booking: bookingProp }: { booking: Booking }) {
return (
<Layout>
<h2 className="text-3xl">Buchung {booking.uuid}</h2>
<Calendar start={booking.startDate} end={booking.endDate} />
<Calendar start={booking.start} end={booking.end} />
<div>
<strong>Buchungszeitraum:</strong> {daysFormatFrontend(booking.days)}
</div>

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()
}

View File

@@ -1,7 +1,11 @@
import { NextApiRequest, NextApiResponse } from 'next'
import { Bill } from '../../../../db/bill'
import { createBill, patchBill } from '../../../../db/index'
export default async function billHandler(req, res): Promise<void> {
export default async function billHandler(
req: NextApiRequest,
res: NextApiResponse
): Promise<void> {
const {
method,
query: { uuid: uuids },