import { NextApiRequest , NextApiResponse } from "next" ; import { generateMockData } from "../../core" ; export default async ( request , response ) => { const { body } = request ; const { value , scale , numberMax } = JSON . parse ( body ) ; const result = await generateMockData ( value , { scale , numberMax } ) ; response . status ( 200 ) . send ( result ) ; } ;