"use strict";(()=>{vare={};e.id=291,e.ids=[291],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")},9973:e=>{e.exports=require("serverless-mysql")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){returnfunctione(r,n){returnninr?r[n]:"then"inr&&"function"==typeofr.then?r.then(r=>e(r,n)):"function"==typeofr&&"default"===n?r:void0}}})},7808:(e,r,n)=>{n.r(r),n.d(r,{config:()=>d,default:()=>c,routeModule:()=>D});vars={};n.r(s),n.d(s,{default:()=>_});vart=n(89947),o=n(2706),i=n(96762),a=n(48786),u=n(69842);asyncfunction_(e,r){if("POST"!==e.method)returnr.json({msg:"Failed!"});letn=await(0,u.A)(e,r,!0);if(!n)returnr.json({success:!1,msg:"Unauthorized"});await(0,a.A)("DELETE FROM invitations WHERE id = ? AND inviting_user_id = ?",[e.body.id,n.id]),r.json({success:!0})}letc=(0,i.M)(s,"default"),d=(0,i.M)(s,"config"),D=newt.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/deleteInvitation",pathname:"/api/deleteInvitation",bundlePath:"",filename:""},userland:s})},69842:(e,r,n)=>{n.d(r,{A:()=>o});vars=n(39908),t=n.n(s);asyncfunctiono(e,r,n){lets=t()({req:e,level:n?"deep":void0});returnconsole.log(s),s.payload}},48786:(e,r,n)=>{n.d(r,{A:()=>t});vars=n(7447);asyncfunctiont(...e){letr=(0,s.A)();try{if(!r)throwError("No Connection provided to DB_HANDLER function!");letn=awaitr.query(...e);returnJSON.parse(JSON.stringify(n))}catch(e){returnconsole.log("DB Error =>",e),{success:!1,error:e.message}}finally{awaitr?.end()}}},7447:(e,r,n)=>{n.d(r,{A:()=>o});vars=n(9973),t=n.n(s);functiono(e){returne?.ro?DSQL_READ_ONLY_DB_CONN||t()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_READ_ONLY_USERNAME,password:process.env.DSQL_DB_READ_ONLY_PASSWORD,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void0,charset:"utf8mb4"}}):e?.fa?global.DSQL_FULL_ACCESS_DB_CONN||t()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_FULL_ACCESS_USERNAME,password:process.env.DSQL_DB_FULL_ACCESS_PASSWORD,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void0,charset:"utf8mb4"}}):global.DSQL_DB_CONN||t()({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:e?.noDb?void0:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void0,charset:"utf8mb4"}})}},2706:(e,r)=>{Object.defineProperty(r,"A",{enumerable:!0,get:function(){returnn}});varn=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,n)=>{e.exports=n(75600)}};varr=require("../../webpack-api-runtime.js");r.C(e);varn=r(r.s=7808);module.exports=n})();