"use strict";(()=>{var e={};e.id=5152,e.ids=[5152],e.modules={53524:e=>{e.exports=require("@prisma/client")},72934:e=>{e.exports=require("next/dist/client/components/action-async-storage.external.js")},54580:e=>{e.exports=require("next/dist/client/components/request-async-storage.external.js")},45869:e=>{e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},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")},6113:e=>{e.exports=require("crypto")},6005:e=>{e.exports=require("node:crypto")},25867:(e,t,n)=>{n.r(t),n.d(t,{originalPathname:()=>h,patchFetch:()=>g,requestAsyncStorage:()=>m,routeModule:()=>l,serverHooks:()=>y,staticGenerationAsyncStorage:()=>x});var r={};n.r(r),n.d(r,{GET:()=>p,dynamic:()=>u});var a=n(49303),s=n(88716),o=n(60670),i=n(13538),d=n(87070),c=n(26501);let u="force-dynamic";async function p(){try{let{userId:e,isBuildPhase:t}=(0,c.d)();if(t||!e)return d.NextResponse.json({attendance:[]},{status:401});let n=await i.Z.attendance.findMany({where:{studentId:e},orderBy:{date:"desc"}});return d.NextResponse.json({attendance:n})}catch(e){return console.error("Failed to fetch student attendance:",e),d.NextResponse.json({attendance:[]},{status:500})}}let l=new a.AppRouteRouteModule({definition:{kind:s.x.APP_ROUTE,page:"/api/v1/attendance/my-attendance/route",pathname:"/api/v1/attendance/my-attendance",filename:"route",bundlePath:"app/api/v1/attendance/my-attendance/route"},resolvedPagePath:"C:\\School Management System\\Working\\V2\\src\\app\\api\\v1\\attendance\\my-attendance\\route.ts",nextConfigOutput:"standalone",userland:r}),{requestAsyncStorage:m,staticGenerationAsyncStorage:x,serverHooks:y}=l,h="/api/v1/attendance/my-attendance/route";function g(){return(0,o.patchFetch)({serverHooks:y,staticGenerationAsyncStorage:x})}},49303:(e,t,n)=>{e.exports=n(30517)},26501:(e,t,n)=>{n.d(t,{d:()=>a});var r=n(78459);function a(){try{let{userId:e,sessionClaims:t}=(0,r.I)();return{userId:e,sessionClaims:t,isBuildPhase:!1}}catch(e){if(e instanceof Error&&(e.message.includes("DYNAMIC_SERVER_USAGE")||e.message.includes("Dynamic server usage")||e.message.includes("headers")))return console.warn("[DeploymentGuard] Build-phase detected — auth() skipped."),{userId:null,sessionClaims:null,isBuildPhase:!0};throw e}}},13538:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(53524);let a=globalThis.prisma??new r.PrismaClient({log:["error"],datasources:{db:{url:process.env.DATABASE_URL}}})}};var t=require("../../../../../webpack-runtime.js");t.C(e);var n=e=>t(t.s=e),r=t.X(0,[8948,7070,8459],()=>n(25867));module.exports=r})();