"use strict";(()=>{var e={};e.id=7007,e.ids=[7007],e.modules={75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},9973:e=>{e.exports=require("serverless-mysql")},29021:e=>{e.exports=require("fs")},96762:(e,r)=>{Object.defineProperty(r,"M",{enumerable:!0,get:function(){return function e(r,t){return t in r?r[t]:"then"in r&&"function"==typeof r.then?r.then(r=>e(r,t)):"function"==typeof r&&"default"===t?r:void 0}}})},30317:(e,r,t)=>{t.r(r),t.d(r,{config:()=>d,default:()=>l,routeModule:()=>p});var s={};t.r(s),t.d(s,{default:()=>u});var n=t(89947),o=t(2706),i=t(96762),a=t(51348),c=t.n(a);async function u(e,r){if("GET"!==e.method)return r.json({msg:"Failed!"});let{social_id:t,social_platform:s}=e.query,n=await c()("SELECT social_id FROM users WHERE social_id=? AND social_platform=?",[t,s]);t&&t[0]?r.json({social_id:n}):r.json({social_id:null})}let l=(0,i.M)(s,"default"),d=(0,i.M)(s,"config"),p=new n.PagesAPIRouteModule({definition:{kind:o.A.PAGES_API,page:"/api/social-login/utils/checkSocialId",pathname:"/api/social-login/utils/checkSocialId",bundlePath:"",filename:""},userland:s})},51348:(e,r,t)=>{let s=t(9973),n=t(21580),o=s({config:{host:process.env.DSQL_DB_HOST,user:process.env.DSQL_DB_USERNAME,password:process.env.DSQL_DB_PASSWORD,database:process.env.DSQL_DB_NAME,port:process.env.DSQL_DB_PORT?Number(process.env.DSQL_DB_PORT):void 0,charset:"utf8mb4",ssl:n()}});async function i(...e){try{let r=await o.query(...e);return await o.end(),JSON.parse(JSON.stringify(r))}catch(e){return console.log("DB Error =>",e),{success:!1,error:e.message}}}e.exports=i},21580:(e,r,t)=>{let s=t(29021);e.exports=function(){let e=process.env.DSQL_SSL_DIR;if(!e?.match(/./))return;let r=`${e}/ca-cert.pem`;if(!s.existsSync(r)){console.log(`${r} does not exist`);return}return{ca:s.readFileSync(`${e}/ca-cert.pem`)}}},2706:(e,r)=>{var t;Object.defineProperty(r,"A",{enumerable:!0,get:function(){return t}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(t||(t={}))},89947:(e,r,t)=>{e.exports=t(75600)}};var r=require("../../../../webpack-api-runtime.js");r.C(e);var t=r(r.s=30317);module.exports=t})();