"use strict";(()=>{var e={};e.id=9659,e.ids=[9659],e.modules={39908:e=>{e.exports=require("@moduletrace/datasquirel/dist/users/user-auth")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},96762:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,n){return n in t?t[n]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,n)):"function"==typeof t&&"default"===n?t:void 0}}})},52262:(e,t,n)=>{n.r(t),n.d(t,{config:()=>l,default:()=>d,routeModule:()=>c});var r={};n.r(r),n.d(r,{default:()=>i});var a=n(89947),s=n(2706),o=n(96762),u=n(69842);async function i(e,t){if("POST"!==e.method)return t.json({msg:"Failed!"});if(!await (0,u.A)(e,t,!0))return t.json({success:!1,msg:"Unauthorized"});let{userId:n,dbSlug:r}=e.body,a=`${process.env.DSQL_USER_DB_PREFIX}${n}_${r}`,s=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${a}`;t.setHeader("Set-Cookie",[`${s}=null;path=/;max-age=0`]),t.json({success:!0,msg:"Processed Successfully"})}let d=(0,o.M)(r,"default"),l=(0,o.M)(r,"config"),c=new a.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/resetDelegatedDatabaseToken",pathname:"/api/resetDelegatedDatabaseToken",bundlePath:"",filename:""},userland:r})},69842:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(39908),a=n.n(r);async function s(e,t,n){let r=a()({req:e,level:n?"deep":void 0});return console.log(r),r.payload}},2706:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return n}});var n=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},89947:(e,t,n)=>{e.exports=n(75600)}};var t=require("../../webpack-api-runtime.js");t.C(e);var n=t(t.s=52262);module.exports=n})();