rip out all old auth data

This commit is contained in:
Thomas Ruoff
2021-10-02 01:03:02 +02:00
committed by Thomas Ruoff
parent b257bc8258
commit 0e84945ab4
8 changed files with 22 additions and 89 deletions

View File

@@ -1,12 +1,7 @@
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): Promise<void> {
if (!isAdminSession(req)) {
res.status(403).send({ message: 'Not Authorized' })
return
}
export default async function billHandler(req, res): Promise<void> {
const {
method,
@@ -41,4 +36,4 @@ export default withSession(async function billHandler(req, res): Promise<void> {
res.setHeader('Allow', ['POST', 'PATCH'])
res.status(405).end(`Method ${method} Not Allowed`)
}
})
}