"use strict";(()=>{var e={};e.id=9659,e.ids=[9659],e.modules={76102:e=>{e.exports=require("@moduletrace/datasquirel/dist/client")},39383:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/actions/users/user-auth")},65967:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/utils/ejson")},93726:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/utils/numberfy")},30889:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/utils/slugify")},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,s){return s in r?r[s]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,s)):"function"==typeof r&&"default"===s?r:void 0}}})},52262:(e,r,s)=>{s.r(r),s.d(r,{config:()=>_,default:()=>d,routeModule:()=>l});var t={};s.r(t),s.d(t,{default:()=>i});var a=s(89947),n=s(2706),u=s(96762),o=s(69842);async function i(e,r){if("POST"!==e.method)return r.json({msg:"Failed!"});let{user:s}=await (0,o.A)(e,r,!0);if(!s)return r.json({success:!1,msg:"Unauthorized"});let{userId:t,dbSlug:a}=e.body,n=`${process.env.DSQL_USER_DB_PREFIX}${t}_${a}`,u=`${process.env.DSQL_USER_DELEGATED_DB_COOKIE_PREFIX}${n}`;r.setHeader("Set-Cookie",[`${u}=null;path=/;max-age=0`]),r.json({success:!0,msg:"Processed Successfully"})}let d=(0,u.M)(t,"default"),_=(0,u.M)(t,"config"),l=new a.PagesAPIRouteModule({definition:{kind:n.A.PAGES_API,page:"/api/resetDelegatedDatabaseToken",pathname:"/api/resetDelegatedDatabaseToken",bundlePath:"",filename:""},userland:t})},55153:(e,r,s)=>{s.d(r,{On:()=>a.a,_n:()=>u}),s(76102);var t=s(65967),a=s.n(t);s(30889);var n=s(93726);let u=s.n(n)()},69842:(e,r,s)=>{s.d(r,{A:()=>u});var t=s(39383),a=s.n(t),n=s(55153);async function u(e,r,s,t){let u=a()({req:e,level:s?"deep":void 0}),o={DSQL_REMOTE_SQL_HOST:process.env.DSQL_REMOTE_SQL_HOST,DSQL_SU_USER_ID:process.env.DSQL_SU_USER_ID,DSQL_HOST_ENV:process.env.DSQL_HOST_ENV,DSQL_HOST:process.env.DSQL_HOST,DSQL_STATIC_HOST:process.env.DSQL_STATIC_HOST,DSQL_GOOGLE_CLIENT_ID:process.env.DSQL_GOOGLE_CLIENT_ID,DSQL_TINY_MCE_API_KEY:process.env.DSQL_TINY_MCE_API_KEY};return t&&u.payload?.id&&(0,n._n)(process.env.DSQL_SU_USER_ID)!==u.payload.id?{user:null,appData:o}:{user:u.payload,appData:o}}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){return s}});var s=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,r,s)=>{e.exports=s(75600)}};var r=require("../../webpack-api-runtime.js");r.C(e);var s=r(r.s=52262);module.exports=s})();