(()=>{var e={};e.id=3352,e.ids=[3352],e.modules={3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},24429:()=>{},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},44870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64749:()=>{},80894:(e,t,r)=>{"use strict";r.r(t),r.d(t,{patchFetch:()=>h,routeModule:()=>u,serverHooks:()=>d,workAsyncStorage:()=>p,workUnitAsyncStorage:()=>l});var o={};r.r(o),r.d(o,{GET:()=>c,POST:()=>i});var s=r(30781),n=r(60554),a=r(31625);async function i(e){try{let t=await e.json(),r=await fetch("http://localhost:3001/api/consultations/",{method:"POST",headers:{"Content-Type":"application/json",cookie:e.headers.get("cookie")||""},body:JSON.stringify(t)});if(console.log(t),!r.ok)return console.error("Backend error:",await r.text()),new Response(JSON.stringify({error:"Failed to create consultation"}),{status:500});let o=await r.json();return new Response(JSON.stringify(o),{status:200})}catch(e){return console.error("Error fetching consultations:",e),new Response(JSON.stringify({error:"Internal server error"}),{status:500})}}async function c(e,t){try{let t=await fetch("http://localhost:3001/api/consultations/",{headers:{"Content-Type":"application/json",cookie:e.headers.get("cookie")||""},method:"GET"});if(!t.ok)throw Error("Failed to fetch consultations");let r=await t.json();return new Response(JSON.stringify(r),{status:200})}catch(e){return console.error("Error fetching consultations:",e),new Response(JSON.stringify({error:"Internal server error"}),{status:500})}}r(96396);let u=new s.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/consultations/route",pathname:"/api/consultations",filename:"route",bundlePath:"app/api/consultations/route"},resolvedPagePath:"/home/kencert/Desktop/Work/consultingsystem/frontend/app/api/consultations/route.js",nextConfigOutput:"",userland:o}),{workAsyncStorage:p,workUnitAsyncStorage:l,serverHooks:d}=u;function h(){return(0,a.patchFetch)({workAsyncStorage:p,workUnitAsyncStorage:l})}}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),o=t.X(0,[1625,9146],()=>r(80894));module.exports=o})();