"use strict";(()=>{var e={};e.id=263,e.ids=[263],e.modules={3524:e=>{e.exports=require("@prisma/client")},7096:e=>{e.exports=require("bcrypt")},9344:e=>{e.exports=require("jsonwebtoken")},145:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},8134:(e,r,t)=>{t.r(r),t.d(r,{config:()=>p,default:()=>d,routeModule:()=>m});var s={};t.r(s),t.d(s,{default:()=>l});var a=t(1802),i=t(7153),u=t(6249),o=t(8103),n=t(432);async function l(e,r){if("GET"!==e.method)return r.status(405).json({success:!1,error:"Method not allowed"});try{if(!await (0,o.m)(e,r))return;let{user:t}=e,s=parseInt(e.query.page||"1",10)||1,a=parseInt(e.query.limit||"20",10)||20,{items:i,total:u}=await n.U.getMaterialsByAuthor(t.id,s,a),l=s*a<u;return r.status(200).json({success:!0,data:{items:i,total:u,page:s,limit:a,hasNext:l},timestamp:new Date().toISOString()})}catch(e){return console.error("Get user materials error:",e),r.status(500).json({success:!1,error:e.message||"Failed to get materials"})}}let d=(0,u.l)(s,"default"),p=(0,u.l)(s,"config"),m=new a.PagesAPIRouteModule({definition:{kind:i.x.PAGES_API,page:"/api/v1/users/me/materials",pathname:"/api/v1/users/me/materials",bundlePath:"",filename:""},userland:s})}};var r=require("../../../../../webpack-api-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[876],()=>t(8134));module.exports=s})();