module.exports=[70406,(e,t,a)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},44950,e=>e.a(async(t,a)=>{try{let t=await e.y("bcryptjs-ee66c2bdc904f2cf");e.n(t),a()}catch(e){a(e)}},!0),49566,e=>e.a(async(t,a)=>{try{var r=e.i(24977),s=e.i(44950),i=t([s]);async function n(e,t){let a,i;if(a="TTWQW222rs#@#@!@",i=e.headers.authorization||"",a&&i===`Bearer ${a}`||(t.status(401).json({success:!1,message:"Unauthorized"}),0))try{if("POST"===e.method){let{name:a,pass:i,role:n}=e.body||{};if(!a||!i||void 0===n)return t.status(400).json({success:!1,message:"name, pass, role are required"});let o=await s.default.hash(String(i),10),d=await r.default.user.create({data:{name:String(a).trim(),pass:o,role:Number(n)},select:{id:!0,name:!0,role:!0,createdAt:!0,updatedAt:!0}});return t.status(201).json({success:!0,user:d})}if("GET"===e.method){let e=await r.default.user.findMany({orderBy:{id:"desc"},select:{id:!0,name:!0,role:!0,createdAt:!0,updatedAt:!0}});return t.status(200).json({success:!0,users:e})}return t.status(405).json({success:!1,message:"Method Not Allowed"})}catch(e){return console.error(e),t.status(500).json({success:!1,message:"Server Error"})}}[s]=i.then?(await i)():i,e.s(["default",()=>n]),a()}catch(e){a(e)}},!1),22699,e=>e.a(async(t,a)=>{try{var r=e.i(26747),s=e.i(90406),i=e.i(44898),n=e.i(62950),o=e.i(49566),d=e.i(7031),l=e.i(81927),u=e.i(46432),c=t([o]);[o]=c.then?(await c)():c;let h=(0,n.hoist)(o,"default"),m=(0,n.hoist)(o,"config"),f=new i.PagesAPIRouteModule({definition:{kind:s.RouteKind.PAGES_API,page:"/api/Users/index",pathname:"/api/Users",bundlePath:"",filename:""},userland:o,distDir:".next",relativeProjectDir:""});async function p(e,t,a){f.isDev&&(0,u.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let s="/api/Users/index";s=s.replace(/\/index$/,"")||"/";let i=await f.prepare(e,t,{srcPage:s});if(!i){t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve());return}let{query:n,params:o,prerenderManifest:c,routerServerContext:p}=i;try{let a=e.method||"GET",r=(0,d.getTracer)(),i=r.getActiveScopeSpan(),u=f.instrumentationOnRequestError.bind(f),h=async i=>f.render(e,t,{query:{...n,...o},params:o,allowedRevalidateHeaderKeys:[],multiZoneDraftMode:!1,trustHostHeader:!1,previewProps:c.preview,propagateError:!1,dev:f.isDev,page:"/api/Users/index",internalRevalidate:null==p?void 0:p.revalidate,onError:(...t)=>u(e,...t)}).finally(()=>{if(!i)return;i.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let e=r.getRootSpanAttributes();if(!e)return;if(e.get("next.span_type")!==l.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${e.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=e.get("next.route");if(n){let e=`${a} ${n}`;i.setAttributes({"next.route":n,"http.route":n,"next.span_name":e}),i.updateName(e)}else i.updateName(`${a} ${s}`)});i?await h(i):await r.withPropagatedContext(e.headers,()=>r.trace(l.BaseServerSpan.handleRequest,{spanName:`${a} ${s}`,kind:d.SpanKind.SERVER,attributes:{"http.method":a,"http.target":e.url}},h))}catch(e){if(f.isDev)throw e;(0,r.sendError)(t,500,"Internal Server Error")}finally{null==a.waitUntil||a.waitUntil.call(a,Promise.resolve())}}e.s(["config",0,m,"default",0,h,"handler",()=>p]),a()}catch(e){a(e)}},!1)];

//# sourceMappingURL=%5Broot-of-the-server%5D__21713548._.js.map