(()=>{var e={};e.id=3150,e.ids=[3150],e.modules={3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12909:(e,r,t)=>{"use strict";function s(){let e=process.env.JWT_SECRET;if(!e)throw Error("JWT_SECRET is not set");return e}function a(e){let r=e.headers.get("authorization");if(r&&r.startsWith("Bearer "))return r.slice(7);let t=e.cookies.get("admin_token")?.value;if(t)return t;let s=e.cookies.get("token")?.value;return s||null}t.d(r,{V:()=>a,u:()=>s})},24739:(e,r,t)=>{"use strict";t.r(r),t.d(r,{patchFetch:()=>g,routeModule:()=>k,serverHooks:()=>y,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>h});var s={};t.r(s),t.d(s,{GET:()=>f});var a=t(96559),n=t(48088),i=t(37719),o=t(32190),u=t(43205),p=t.n(u),c=t(96330),l=t(12909);let d=new c.PrismaClient,m=(0,l.u)();async function x(e){let r=(0,l.V)(e);if(!r)return null;try{let e=p().verify(r,m);if(e.isGlobalAdmin&&e.globalAdminId)return e}catch{}return null}async function f(e){try{if(!await x(e))return o.NextResponse.json({error:"Unauthorized"},{status:401});let r=await d.marketplace.findMany({orderBy:{name:"asc"}});return o.NextResponse.json({marketplaces:r})}catch(e){return console.error("Marketplaces list error:",e),o.NextResponse.json({error:"Server error"},{status:500})}}let k=new a.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/admin/marketplaces/route",pathname:"/api/admin/marketplaces",filename:"route",bundlePath:"app/api/admin/marketplaces/route"},resolvedPagePath:"/Users/mustafaseyhan/Project/PazarAnalist/src/app/api/admin/marketplaces/route.ts",nextConfigOutput:"standalone",userland:s}),{workAsyncStorage:v,workUnitAsyncStorage:h,serverHooks:y}=k;function g(){return(0,i.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:h})}},27910:e=>{"use strict";e.exports=require("stream")},28354:e=>{"use strict";e.exports=require("util")},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},44870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:e=>{"use strict";e.exports=require("crypto")},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},79428:e=>{"use strict";e.exports=require("buffer")},96330:e=>{"use strict";e.exports=require("@prisma/client")},96487:()=>{}};var r=require("../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[4447,580,3205],()=>t(24739));module.exports=s})();