"use strict";(()=>{var e={};e.id=597,e.ids=[597],e.modules={53524:e=>{e.exports=require("@prisma/client")},20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},87137:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>g,patchFetch:()=>x,requestAsyncStorage:()=>l,routeModule:()=>p,serverHooks:()=>v,staticGenerationAsyncStorage:()=>m});var a={};r.r(a),r.d(a,{GET:()=>c,dynamic:()=>d});var n=r(49303),s=r(88716),o=r(60670),i=r(87070),u=r(13538);let d="force-dynamic";async function c(){try{let e=(await u.Z.student.findMany({select:{id:!0,name:!0,surname:!0,class:{select:{name:!0}}},orderBy:[{surname:"asc"},{name:"asc"}]})).map(e=>({id:e.id,name:e.name,surname:e.surname,className:e.class.name}));return i.NextResponse.json({students:e})}catch(e){return console.error("[AttendanceStudents] Error:",e),i.NextResponse.json({error:"Internal Server Error",message:String(e)},{status:500})}}let p=new n.AppRouteRouteModule({definition:{kind:s.x.APP_ROUTE,page:"/api/v1/attendance/students/route",pathname:"/api/v1/attendance/students",filename:"route",bundlePath:"app/api/v1/attendance/students/route"},resolvedPagePath:"C:\\School Management System\\Working\\V2\\src\\app\\api\\v1\\attendance\\students\\route.ts",nextConfigOutput:"standalone",userland:a}),{requestAsyncStorage:l,staticGenerationAsyncStorage:m,serverHooks:v}=p,g="/api/v1/attendance/students/route";function x(){return(0,o.patchFetch)({serverHooks:v,staticGenerationAsyncStorage:m})}},49303:(e,t,r)=>{e.exports=r(30517)},13538:(e,t,r)=>{r.d(t,{Z:()=>n});var a=r(53524);let n=globalThis.prisma??new a.PrismaClient({log:["error"],datasources:{db:{url:process.env.DATABASE_URL}}})}};var t=require("../../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),a=t.X(0,[8948,7070],()=>r(87137));module.exports=a})();