"use strict";(()=>{vare={};e.id=6298,e.ids=[6298],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},72583:e=>{e.exports=require("sanitize-html")},9973:e=>{e.exports=require("serverless-mysql")},79428:e=>{e.exports=require("buffer")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},21407:(e,r,s)=>{s.r(r),s.d(r,{config:()=>p,default:()=>o,routeModule:()=>m});vari={};s.r(i),s.d(i,{default:()=>d});vara=s(89947),t=s(2706),u=s(96762),l=s(98e3),n=s(48786);asyncfunctiond(e,r){if("POST"!==e.method)returnr.json({msg:"Failed!"});let{email:s,alerts:i,userId:a}=e.body;if(i)i&&await(0,n.A)("DELETE FROM unsubscribes WHERE email=? AND type='alerts'",[s]);else{lete=await(0,n.A)("SELECT email FROM unsubscribes WHERE email=? AND type='alerts'",[s]);e&&e[0]||await(0,l.A)({dbFullName:"datasquirel",tableName:"unsubscribes",data:{email:s,type:"alerts",user_id:a||null}})}r.json({success:!0})}leto=(0,u.M)(i,"default"),p=(0,u.M)(i,"config"),m=newa.PagesAPIRouteModule({definition:{kind:t.A.PAGES_API,page:"/api/unsubscribe",pathname:"/api/unsubscribe",bundlePath:"",filename:""},userland:i})}};varr=require("../../webpack-api-runtime.js");r.C(e);vars=e=>r(r.s=e),i=r.X(0,[1251],()=>s(21407));module.exports=i})();