"use strict";(()=>{var e={};e.id=5450,e.ids=[5450],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")},38614:(e,r,t)=>{t.r(r),t.d(r,{originalPathname:()=>h,patchFetch:()=>m,requestAsyncStorage:()=>d,routeModule:()=>l,serverHooks:()=>y,staticGenerationAsyncStorage:()=>c});var s={};t.r(s),t.d(s,{GET:()=>p});var n=t(49303),o=t(88716),a=t(60670),i=t(87070),u=t(72331);async function p(e){let{searchParams:r}=new URL(e.url),t=r.get("userId");if(!t)return i.NextResponse.json({error:"User ID required"},{status:400});try{let e=await u._.transaction.findMany({where:{userId:t,type:"SPIN_WIN"},orderBy:{createdAt:"desc"},take:20});return i.NextResponse.json({history:e})}catch(e){return console.error("History Fetch Error:",e),i.NextResponse.json({error:"Internal server error"},{status:500})}}let l=new n.AppRouteRouteModule({definition:{kind:o.x.APP_ROUTE,page:"/api/luckyspin/history/route",pathname:"/api/luckyspin/history",filename:"route",bundlePath:"app/api/luckyspin/history/route"},resolvedPagePath:"C:\\Users\\MSI\\Downloads\\film\\app\\api\\luckyspin\\history\\route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:d,staticGenerationAsyncStorage:c,serverHooks:y}=l,h="/api/luckyspin/history/route";function m(){return(0,a.patchFetch)({serverHooks:y,staticGenerationAsyncStorage:c})}},72331:(e,r,t)=>{t.d(r,{_:()=>n});var s=t(53524);let n=global.prisma||new s.PrismaClient}};var r=require("../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[8948,5972],()=>t(38614));module.exports=s})();