"use strict";(()=>{vare={};e.id=6298,e.ids=[6298],e.modules={27825:e=>{e.exports=require("lodash")},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")},33873:e=>{e.exports=require("path")},10031:(e,r,s)=>{s.r(r),s.d(r,{config:()=>b,default:()=>m,routeModule:()=>c});vari={};s.r(i),s.d(i,{default:()=>p});vara=s(89947),t=s(2706),u=s(96762),l=s(47670),n=s.n(l),o=s(51348),d=s.n(o);asyncfunctionp(e,r){if("POST"!==e.method)returnr.json({msg:"Failed!"});let{email:s,alerts:i,userId:a}=e.body;if(i)i&&awaitd()("DELETE FROM unsubscribes WHERE email=? AND type='alerts'",[s]);else{lete=awaitd()("SELECT email FROM unsubscribes WHERE email=? AND type='alerts'",[s]);e&&e[0]||awaitn()({dbFullName:"datasquirel",tableName:"unsubscribes",data:{email:s,type:"alerts",user_id:a||null}})}r.json({success:!0})}letm=(0,u.M)(i,"default"),b=(0,u.M)(i,"config"),c=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,[4050],()=>s(10031));module.exports=i})();