"use strict";(()=>{var e={};e.id=5652,e.ids=[5652],e.modules={85890:e=>{e.exports=require("better-sqlite3")},20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},84770:e=>{e.exports=require("crypto")},92048:e=>{e.exports=require("fs")},19801:e=>{e.exports=require("os")},55315:e=>{e.exports=require("path")},62214:(e,r,t)=>{t.r(r),t.d(r,{originalPathname:()=>x,patchFetch:()=>m,requestAsyncStorage:()=>l,routeModule:()=>c,serverHooks:()=>v,staticGenerationAsyncStorage:()=>w});var o={};t.r(o),t.d(o,{PATCH:()=>p});var s=t(49303),i=t(88716),a=t(60670),n=t(87070),u=t(97425),d=t(75748);async function p(e,{params:r}){try{let e=(0,u.n)();if(!(0,d.gU)(e,r.id))return n.NextResponse.json({error:`Worktree '${r.id}' not found`},{status:404});let t=new Date;return(0,d.Of)(e,r.id,t),console.log(`[viewed] Marked worktree ${r.id} as viewed at ${t.toISOString()}`),n.NextResponse.json({success:!0},{status:200})}catch(e){return console.error("Error updating viewed status:",e),n.NextResponse.json({error:"Failed to update viewed status"},{status:500})}}let c=new s.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/worktrees/[id]/viewed/route",pathname:"/api/worktrees/[id]/viewed",filename:"route",bundlePath:"app/api/worktrees/[id]/viewed/route"},resolvedPagePath:"/home/runner/work/CommandMate/CommandMate/src/app/api/worktrees/[id]/viewed/route.ts",nextConfigOutput:"",userland:o}),{requestAsyncStorage:l,staticGenerationAsyncStorage:w,serverHooks:v}=c,x="/api/worktrees/[id]/viewed/route";function m(){return(0,a.patchFetch)({serverHooks:v,staticGenerationAsyncStorage:w})}}};var r=require("../../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),o=r.X(0,[8948,5972,7425],()=>t(62214));module.exports=o})();