1 line
2.5 KiB
JavaScript
1 line
2.5 KiB
JavaScript
"use strict";(()=>{var e={};e.id=6598,e.ids=[6598],e.modules={3295:e=>{e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},5257:(e,r,t)=>{t.r(r),t.d(r,{patchFetch:()=>v,routeModule:()=>d,serverHooks:()=>g,workAsyncStorage:()=>l,workUnitAsyncStorage:()=>q});var s={};t.r(s),t.d(s,{GET:()=>c});var o=t(96559),i=t(48088),n=t(37719),a=t(32190),u=t(19854),p=t(26690),x=t(70014);async function c(e){try{let e=await (0,u.getServerSession)(p.N);if(!e||!e.user?.id)return a.NextResponse.json({error:"Not authenticated"},{status:401});let r=e.user.id,t=x.J.getInstance(),s=await t.getNotificationCount(r),o=a.NextResponse.json(s);return o.headers.set("Cache-Control","private, max-age=10"),o}catch(e){return console.error("Error in notification count API:",e),a.NextResponse.json({error:"Internal server error",message:e.message},{status:500})}}let d=new o.AppRouteRouteModule({definition:{kind:i.RouteKind.APP_ROUTE,page:"/api/notifications/count/route",pathname:"/api/notifications/count",filename:"route",bundlePath:"app/api/notifications/count/route"},resolvedPagePath:"/Users/alma/Documents/NeahNew/app/api/notifications/count/route.ts",nextConfigOutput:"",userland:s}),{workAsyncStorage:l,workUnitAsyncStorage:q,serverHooks:g}=d;function v(){return(0,n.patchFetch)({workAsyncStorage:l,workUnitAsyncStorage:q})}},10846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11723:e=>{e.exports=require("querystring")},12412:e=>{e.exports=require("assert")},14985:e=>{e.exports=require("dns")},21820:e=>{e.exports=require("os")},27910:e=>{e.exports=require("stream")},28354:e=>{e.exports=require("util")},29294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},34631:e=>{e.exports=require("tls")},41204:e=>{e.exports=require("string_decoder")},44870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},55511:e=>{e.exports=require("crypto")},55591:e=>{e.exports=require("https")},63033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},74075:e=>{e.exports=require("zlib")},79428:e=>{e.exports=require("buffer")},79551:e=>{e.exports=require("url")},81630:e=>{e.exports=require("http")},83997:e=>{e.exports=require("tty")},91645:e=>{e.exports=require("net")},94735:e=>{e.exports=require("events")}};var r=require("../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[4243,5419,580,8794,1642,6781,1890],()=>t(5257));module.exports=s})(); |