"use strict";(()=>{var e={};e.id=4396,e.ids=[4396],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,n){return n in r?r[n]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,n)):"function"==typeof r&&"default"===n?r:void 0}}})},80371:(e,r,n)=>{n.r(r),n.d(r,{config:()=>p,default:()=>l,routeModule:()=>P});var t={};n.r(t),n.d(t,{default:()=>d});var i=n(89947),o=n(2706),a=n(96762),u=n(29021),s=n.n(u);async function d(e,r){if("POST"!==e.method)return r.json({user:null,msg:"Failed"});let{component:n,message:t,user:i}=e.body,o=`💻 CLIENT ERROR =========================== User Id: ${i?.id} User Name: ${i?.first_name} ${i?.last_name} User Email: ${i?.email} Error Message: ${t} Component: ${n} Date: ${Date()} ========================================`,a=s().readFileSync("./.tmp/error.log","utf-8");s().writeFileSync("./.tmp/error.log",o),s().appendFileSync("./.tmp/error.log",` ${a}`),r.json({success:!0})}let l=(0,a.M)(t,"default"),p=(0,a.M)(t,"config"),P=new i.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/admin/clientError",pathname:"/api/admin/clientError",bundlePath:"",filename:""},userland:t})},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return n}});var n=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,n)=>{e.exports=n(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var n=r(r.s=80371);module.exports=n})();