feat: add extensive test suite
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
type AuthHandler = (request: Request) => Response | Promise<Response>;
|
||||
|
||||
export function createAuthHandlers<TAuth>(
|
||||
toHandler: (auth: TAuth) => { GET: AuthHandler; POST: AuthHandler },
|
||||
auth: TAuth,
|
||||
) {
|
||||
return toHandler(auth);
|
||||
}
|
||||
Reference in New Issue
Block a user