"use strict";(()=>{var e={};e.id=504,e.ids=[504],e.modules={2934:e=>{e.exports=require("next/dist/client/components/action-async-storage.external.js")},4580:e=>{e.exports=require("next/dist/client/components/request-async-storage.external.js")},5869:e=>{e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},8893:e=>{e.exports=require("buffer")},4770:e=>{e.exports=require("crypto")},6162:e=>{e.exports=require("stream")},1764:e=>{e.exports=require("util")},1097:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>m,patchFetch:()=>y,requestAsyncStorage:()=>d,routeModule:()=>l,serverHooks:()=>v,staticGenerationAsyncStorage:()=>x});var n={};r.r(n),r.d(n,{GET:()=>p});var a=r(9303),i=r(8716),s=r(670),o=r(7070),u=r(728),c=r(5456);async function p(){if(!await (0,c.PR)())return o.NextResponse.json({error:"Unauthorized"},{status:401});let e=await u._.activityLog.findMany({orderBy:{createdAt:"desc"},take:100,include:{user:{select:{name:!0,username:!0}}}});return o.NextResponse.json({logs:e})}let l=new a.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/activity/route",pathname:"/api/activity",filename:"route",bundlePath:"app/api/activity/route"},resolvedPagePath:"/Users/jakeshore/.clawdbot/workspace/oskv-dashboard/src/app/api/activity/route.ts",nextConfigOutput:"",userland:n}),{requestAsyncStorage:d,staticGenerationAsyncStorage:x,serverHooks:v}=l,m="/api/activity/route";function y(){return(0,s.patchFetch)({serverHooks:v,staticGenerationAsyncStorage:x})}},5456:(e,t,r)=>{r.d(t,{PR:()=>u,fT:()=>o});var n=r(1482),a=r.n(n),i=r(1615);let s=process.env.JWT_SECRET||"fallback-secret";function o(e){return a().sign(e,s,{expiresIn:"7d"})}async function u(){let e=await (0,i.cookies)(),t=e.get("token")?.value;return t?function(e){try{return a().verify(e,s)}catch{return null}}(t):null}},728:(e,t,r)=>{r.d(t,{_:()=>a});let n=require("@prisma/client"),a=globalThis.prisma||new n.PrismaClient}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),n=t.X(0,[276,972,261],()=>r(1097));module.exports=n})();