(()=>{var e={};e.id=4068,e.ids=[4068],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")},23009:(e,t,r)=>{"use strict";r.r(t),r.d(t,{patchFetch:()=>h,routeModule:()=>u,serverHooks:()=>l,workAsyncStorage:()=>c,workUnitAsyncStorage:()=>d});var s={};r.r(s),r.d(s,{GET:()=>p});var o=r(30781),n=r(60554),a=r(31625),i=r(80129);let p=async e=>{let t=await (0,i.UL)();if(!t.get("token")?.value)return new Response(JSON.stringify({error:"Unauthorized"}),{status:401});try{let{searchParams:t}=e.nextUrl,r=t.get("doctorId");console.log("Doctor ID:",r);let s=new URL("http://localhost:3001/api/patients");r&&s.searchParams.set("doctorId",r);let o=await fetch(s.toString(),{method:"GET",headers:{"Content-Type":"application/json",cookie:e.headers.get("cookie")||""}});if(!o.ok)throw Error("Failed to fetch patients");let n=await o.json();return new Response(JSON.stringify(n),{status:200})}catch(e){return console.error("Error fetching patients:",e),new Response(JSON.stringify({error:"Internal server error"}),{status:500})}},u=new o.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/patients/route",pathname:"/api/patients",filename:"route",bundlePath:"app/api/patients/route"},resolvedPagePath:"/home/kencert/Desktop/Work/consultingsystem/frontend/app/api/patients/route.js",nextConfigOutput:"",userland:s}),{workAsyncStorage:c,workUnitAsyncStorage:d,serverHooks:l}=u;function h(){return(0,a.patchFetch)({workAsyncStorage:c,workUnitAsyncStorage:d})}},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:()=>{}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[1625,3197],()=>r(23009));module.exports=s})();