// import dataJson from './basic/data.json'
import fs from 'fs'

export default eventHandler(async (event) => {
    const token = event.context.auth.token
    if (!token) return {status: 'unauthenticated'}

    const type = getRouterParam(event, 'type')
    const data = getRouterParam(event, 'data')
    const jsonString = fs.readFileSync('/home/kanzi/node/nuxt/vitify-nuxt/server/api/forms/json/'+type+'/'+data+'.json', 'utf-8');
    return jsonString
  })