remove *Document intefaces from FE code

This commit is contained in:
Thomas Ruoff
2020-11-06 23:37:04 +01:00
parent 71c16a289d
commit 195da65cd9
13 changed files with 84 additions and 60 deletions

View File

@@ -1,9 +1,9 @@
import { BillDocument } from '../../../../../db/bill'
import { Bill } from '../../../../../db/bill'
import { createBill, patchBill } from '../../../../../db/index'
import withSession, { isAdminSession } from '../../../../../lib/session'
export default withSession(async function billHandler(req, res) {
if (!isAdminSession(req, res)) {
if (!isAdminSession(req)) {
res.status(403).send({ message: 'Not Authorized' })
return
}
@@ -14,7 +14,7 @@ export default withSession(async function billHandler(req, res) {
} = req
const bookingUUID = Array.isArray(uuids) ? uuids[0] : uuids
let bill: BillDocument
let bill: Bill
switch (method) {
case 'POST':

View File

@@ -8,7 +8,7 @@ import {
import { BOOKING_STATUS } from '../../../../../db/enums'
export default withSession(async function bookingHandler(req, res) {
if (!isAdminSession(req, res)) {
if (!isAdminSession(req)) {
res.status(403).send({ message: 'Not Authorized' })
return
}