"use strict";(()=>{vare={};e.id=9971,e.ids=[9971],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},55511:e=>{e.exports=require("crypto")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){returnfunctione(r,t){returntinr?r[t]:"then"inr&&"function"==typeofr.then?r.then(r=>e(r,t)):"function"==typeofr&&"default"===t?r:void0}}})},23297:(e,r,t)=>{t.r(r),t.d(r,{config:()=>P,default:()=>c,routeModule:()=>f});varn={};t.r(n),t.d(n,{default:()=>d});varo=t(89947),i=t(2706),a=t(96762),s=t(83919),u=t(48786);asyncfunctiond(e,r){if("GET"!==e.method)returnr.json({msg:"UNauthorized"});{let{email:t,password:n}=e.query,o=(0,s.A)({encryptionKey:process.env.DSQL_ENCRYPTION_PASSWORD||"",password:String(n)}),i=await(0,u.A)(`UPDATE users SET password='${o}' WHERE email='${t}'`);r.json({success:!!i?.affectedRows})}}letc=(0,a.M)(n,"default"),P=(0,a.M)(n,"config"),f=newo.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/resetPassword",pathname:"/api/resetPassword",bundlePath:"",filename:""},userland:n})},83919:(e,r,t)=>{t.d(r,{A:()=>o});varn=t(55511);functiono({password:e,encryptionKey:r}){lett=r||process.env.DSQL_ENCRYPTION_PASSWORD;if(!t?.match(/.{8,}/))throwError("Encryption key is invalid");leto=(0,n.createHmac)("sha512",t);returno.update(e),o.digest("base64")}},48786:(e,r,t)=>{t.d(r,{A:()=>n});asyncfunctionn(...e){letr=global.DSQL_DB_CONN;try{if(!r)throwError("No Connection provided to DB_HANDLER function!");lett=awaitr.query(...e);returnJSON.parse(JSON.stringify(t))}catch(e){returnconsole.log("DB Error =>",e),{success:!1,error:e.message}}finally{awaitr?.end()}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){returnt}});vart=function(e){returne.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,r,t)=>{e.exports=t(75600)}};varr=require("../../webpack-api-runtime.js");r.C(e);vart=r(r.s=23297);module.exports=t})();