"use strict";(()=>{vare={};e.id=7664,e.ids=[7664],e.modules={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,s){returnsinr?r[s]:"then"inr&&"function"==typeofr.then?r.then(r=>e(r,s)):"function"==typeofr&&"default"===s?r:void0}}})},35179:(e,r,s)=>{s.r(r),s.d(r,{config:()=>c,default:()=>D,routeModule:()=>d});varo={};s.r(o),s.d(o,{default:()=>u});varn=s(89947),t=s(2706),a=s(96762),_=s(48786),i=s(69842);asyncfunctionu(e,r){if("GET"!==e.method)returnr.json({msg:"Failed!"});lets=await(0,i.A)(e,r);if(!s)returnr.json({success:!1,msg:"Unauthorized"});leto=await(0,_.A)(`SELECT * FROM user_media WHERE user_id=${s.id} ORDER BY id DESC`);r.json({media:o})}letD=(0,a.M)(o,"default"),c=(0,a.M)(o,"config"),d=newn.PagesAPIRouteModule({definition:{kind:t.A.PAGES_API,page:"/api/getUserMedia",pathname:"/api/getUserMedia",bundlePath:"",filename:""},userland:o})},69842:(e,r,s)=>{asyncfunctiono(e,r,s){returnObject(function(){vare=Error("Cannot find module '@moduletrace/datasquirel/dist/users/user-auth'");throwe.code="MODULE_NOT_FOUND",e}())({req:e,level:s?"deep":void0}).payload}s.d(r,{A:()=>o}),function(){vare=Error("Cannot find module '@moduletrace/datasquirel/dist/users/user-auth'");throwe.code="MODULE_NOT_FOUND",e}()},48786:(e,r,s)=>{s.d(r,{A:()=>n});varo=s(7447);asyncfunctionn(...e){letr=(0,o.A)();try{if(!r)throwError("No Connection provided to DB_HANDLER function!");lets=awaitr.query(...e);returnJSON.parse(JSON.stringify(s))}catch(e){returnconsole.log("DB Error =>",e),{success:!1,error:e.message}}finally{awaitr?.end()}}},7447:(e,r,s)=>{s.d(r,{A:()=>t});varo=s(9973),n=s.n(o);functiont(e){returnglobal.DSQL_USE_LOCAL||e?.local?global.DSQL_DB_CONN||n()({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"}}):e?.ro?global.DSQL_READ_ONLY_DB_CONN||n()({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||n()({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||n()({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(){returns}});vars=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,s)=>{e.exports=s(75600)}};varr=require("../../webpack-api-runtime.js");r.C(e);vars=r(r.s=35179);module.exports=s})();