dashpresshq/dashpress

View on GitHub
src/backend/lib/request/portal/main.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import type { NextApiRequest, NextApiResponse } from "next";

import { noop } from "@/shared/lib/noop";

export const requestHook = async (
  req: NextApiRequest,
  fn: () => Promise<void | NextApiResponse>
) => {
  noop(req);
  return await fn();
};