"use strict";(()=>{var e={};e.id=3024,e.ids=[3024],e.modules={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")},84770:e=>{e.exports=require("crypto")},92048:e=>{e.exports=require("fs")},19801:e=>{e.exports=require("os")},55315:e=>{e.exports=require("path")},92761:e=>{e.exports=require("node:async_hooks")},17718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},15673:e=>{e.exports=require("node:events")},87561:e=>{e.exports=require("node:fs")},93977:e=>{e.exports=require("node:fs/promises")},70612:e=>{e.exports=require("node:os")},49411:e=>{e.exports=require("node:path")},97742:e=>{e.exports=require("node:process")},25997:e=>{e.exports=require("node:tty")},47261:e=>{e.exports=require("node:util")},78416:(e,r,i)=>{i.r(r),i.d(r,{originalPathname:()=>v,patchFetch:()=>m,requestAsyncStorage:()=>c,routeModule:()=>l,serverHooks:()=>f,staticGenerationAsyncStorage:()=>x});var t={};i.r(t),i.d(t,{POST:()=>d,dynamic:()=>u});var o=i(49790),s=i(60540),a=i(82273),n=i(19096),p=i(92795);let u="force-dynamic";async function d(e){try{let{token:r}=await e.json();if(!r||"string"!=typeof r||r.length<20)return n.NextResponse.json({error:"Invalid activation token."},{status:400});let i=await p._.user.findFirst({where:{verificationToken:r}});if(!i)return n.NextResponse.json({error:"This activation link is invalid or has already been used."},{status:400});if(i.emailVerified)return n.NextResponse.json({ok:!0,alreadyVerified:!0,email:i.email});if(i.verificationTokenExpiry&&i.verificationTokenExpiry.getTime()<Date.now())return n.NextResponse.json({error:"This activation link has expired. Please sign up again."},{status:400});return await p._.user.update({where:{id:i.id},data:{emailVerified:new Date,verificationToken:null,verificationTokenExpiry:null}}),n.NextResponse.json({ok:!0,email:i.email})}catch(e){return console.error("verify-email error",e),n.NextResponse.json({error:"Activation failed. Please try again."},{status:500})}}let l=new o.AppRouteRouteModule({definition:{kind:s.x.APP_ROUTE,page:"/api/verify-email/route",pathname:"/api/verify-email",filename:"route",bundlePath:"app/api/verify-email/route"},resolvedPagePath:"/Users/andrasgyenes/Desktop/MrQuery 2026/HyreMe/Archive/hyreme-app/app/api/verify-email/route.ts",nextConfigOutput:"standalone",userland:t}),{requestAsyncStorage:c,staticGenerationAsyncStorage:x,serverHooks:f}=l,v="/api/verify-email/route";function m(){return(0,a.patchFetch)({serverHooks:f,staticGenerationAsyncStorage:x})}}};var r=require("../../../webpack-runtime.js");r.C(e);var i=e=>r(r.s=e),t=r.X(0,[9085,400,8664,2795],()=>i(78416));module.exports=t})();