make storing work

This commit is contained in:
Thomas Ruoff
2020-07-25 19:19:37 +02:00
parent 279210599b
commit 90a9288e84
6 changed files with 201 additions and 2 deletions

View File

@@ -1,6 +1,12 @@
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
export default (req, res) => {
import { getAllBookings } from './db/index'
export default async (req, res) => {
const bookings = await getAllBookings()
console.log(bookings)
res.statusCode = 200
res.json(['2020-07-23', '2020-07-24', '2020-07-25', '2020-08-01'])
}