mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-04 23:17:12 +01:00
rip out all old auth data
This commit is contained in:
committed by
Thomas Ruoff
parent
b257bc8258
commit
0e84945ab4
@@ -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`)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user