You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
559 B
20 lines
559 B
import { NextApiRequest, NextApiResponse } from 'next'; |
|
|
|
import { APIRouteHandlerMap } from '../../../types/APIRouteHandlerMap'; |
|
|
|
import handleAPIGetOneAnvil from '../../../lib/anvil/handleAPIGetOneAnvil'; |
|
|
|
const ROUTE_HANDLER_MAP: APIRouteHandlerMap = { |
|
GET: handleAPIGetOneAnvil, |
|
}; |
|
|
|
async function handleAPIOneAnvil( |
|
request: NextApiRequest, |
|
response: NextApiResponse, |
|
): Promise<void> { |
|
const { method: httpMethod = 'GET' }: NextApiRequest = request; |
|
|
|
await ROUTE_HANDLER_MAP[httpMethod](request, response); |
|
} |
|
|
|
export default handleAPIOneAnvil;
|
|
|