13 lines
1.6 KiB
JavaScript
13 lines
1.6 KiB
JavaScript
"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,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},80371:(e,r,t)=>{t.r(r),t.d(r,{config:()=>l,default:()=>d,routeModule:()=>p});var n={};t.r(n),t.d(n,{default:()=>s});var i=t(89947),o=t(2706),a=t(96762);let u=t(29021);async function s(e,r){if("POST"!==e.method)return r.json({user:null,msg:"Failed"});let{component:t,message:n,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: ${n}
|
|
Component: ${t}
|
|
Date: ${Date()}
|
|
========================================`,a=u.readFileSync("./.tmp/error.log","utf-8");u.writeFileSync("./.tmp/error.log",o),u.appendFileSync("./.tmp/error.log",`
|
|
|
|
|
|
|
|
|
|
${a}`),r.json({success:!0})}let d=(0,a.M)(n,"default"),l=(0,a.M)(n,"config"),p=new i.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/admin/clientError",pathname:"/api/admin/clientError",bundlePath:"",filename:""},userland:n})},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}});var t=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,t)=>{e.exports=t(75600)}};var r=require("../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=80371);module.exports=t})(); |