withMiddleware updated

This commit is contained in:
tmshv committed 2019-11-23 22:23:07 +03:00
1 parent 0505c29eea
commit 950d0c4ffc
2 files changed
+6 -3

No files matched your search

-3
View File
@@ -1,3 +0,0 @@
import { withCollection } from './withCollection'
export const withMiddleware = handler => withCollection(handler)
+6
View File
@@ -0,0 +1,6 @@
import { withCollection } from './withCollection'
import { NextApiRequest, NextApiResponse } from 'next'
export type Handler = (req: NextApiRequest, res: NextApiResponse) => void
export const withMiddleware = (handler: Handler) => withCollection(handler)