dsql-admin/dsql-app/.local_dist/server/pages/api/checkExistingFolder.js
Benjamin Toby 81cf010cb5 Updates
2025-01-14 16:27:08 +01:00

1 line
1.8 KiB
JavaScript

"use strict";(()=>{var e={};e.id=6422,e.ids=[6422],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")},29021:e=>{e.exports=require("fs")},33873:e=>{e.exports=require("path")},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}}})},49860:(e,t,n)=>{n.r(t),n.d(t,{config:()=>P,default:()=>p,routeModule:()=>A});var r={};n.r(r),n.d(r,{default:()=>f});var i=n(89947),s=n(2706),o=n(96762),u=n(29021),a=n.n(u),d=n(33873),c=n.n(d),l=n(69842);async function f(e,t){if("GET"!==e.method)return t.json({msg:"Failed!"});let n=await (0,l.A)(e,t);if(!n)return t.json({success:!1,msg:"Unauthorized"});let{name:r,folder:i}=e.query,s=process.env.DSQL_STATIC_SERVER_DIR;if(!s)return console.log("Static File ENV not Found!"),t.json({success:!1,msg:"No Static Path!"});let o=c().join(s,`images/user-images/user-${n.id}/${i?i+"/":""}`),u=a().existsSync(o+r);t.json({success:u})}let p=(0,o.M)(r,"default"),P=(0,o.M)(r,"config"),A=new i.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/checkExistingFolder",pathname:"/api/checkExistingFolder",bundlePath:"",filename:""},userland:r})},69842:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(39908),i=n.n(r);async function s(e,t,n){let r=i()({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=49860);module.exports=n})();