import { NextResponse } from 'next/server'; /** * This route provides an endpoint for a client side fetch request to call * the `findOne()` method on the Postcode Model. It should be imported into a theme * at `app/api/postcodes/[urlLabel]/route.ts` and called inside the exported * GET function. * * The GET function in the theme takes in the request and a `urlLabel` param as * an argument which should in turn be passed to this function as an argument. * * @example * ```tsx * import '../../../api'; * * import routes from '../../../routes'; * * export async function GET( * request: Request, * { * params, * }: { * params: { urlLabel: string }; * } * ) { * return routes.postcodes.show(request, { params }); * } * ``` * * The endpoint can then be called at `/api/postcodes/`. * * @exmaple * ```tsx * const postcodeResponse = await fetch( * `/api/postcodes/${currentSearch.q.replaceAll(' ', '-')}` * ); * ``` */ export default function show(request: Request, { params, }: { params: { urlLabel: string; }; }): Promise | NextResponse>; //# sourceMappingURL=postcodes-show.d.ts.map