move db into api

This commit is contained in:
Thomas Ruoff
2020-08-01 16:05:32 +02:00
parent 6b246894cf
commit 528f46a533
4 changed files with 3 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
import { createBooking } from '../../db/index'
import { createBooking } from './db/index'
import { Error } from 'mongoose'
export default async function userHandler(req, res) {

View File

@@ -1,6 +1,6 @@
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
import { getBookedDays } from '../../db/index'
import { getBookedDays } from './db/index'
export default async function useHandler(req, res) {
const { method } = req

View File

@@ -1,6 +1,6 @@
import { Schema } from 'mongoose'
import { getDays, dateFormat } from '../lib/dateHelper'
import { getDays, dateFormat } from '../../helpers/date'
export const BookerSchema = new Schema(
{