T.ME/BIBIL_0DAY
CasperSecurity


Server : Apache/2
System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User : gositeme ( 1004)
PHP Version : 8.2.29
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Directory :  /home/gositeme/domains/lavocat.ca/private_html/.next/server/pages/api/public/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/domains/lavocat.ca/private_html/.next/server/pages/api/public/business-profiles.js
"use strict";(()=>{var e={};e.id=3292,e.ids=[3292],e.modules={8667:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return a}});var a=function(e){return e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE",e}({})},33480:(e,t,a)=>{e.exports=a(75600)},59037:(e,t,a)=>{a.r(t),a.d(t,{config:()=>d,default:()=>u,routeModule:()=>c});var r={};a.r(r),a.d(r,{default:()=>o});var s=a(33480),i=a(8667),n=a(86435),l=a(76760);async function o(e,t){if("GET"!==e.method)return t.status(405).json({message:"Method not allowed"});try{let e=(await l.z.businessProfile.findMany({where:{isPublic:!0},include:{owner:{select:{id:!0,name:!0,email:!0,role:!0,isProfilePublic:!0,profilePicture:!0,specialization:!0,yearsOfExperience:!0,totalCases:!0,wonCases:!0,lostCases:!0,averageRating:!0,hourlyRate:!0,totalBadges:!0,level:!0,isVerified:!0}},members:{select:{id:!0,name:!0,email:!0,role:!0,profilePicture:!0,specialization:!0,yearsOfExperience:!0,totalCases:!0,wonCases:!0,lostCases:!0,averageRating:!0,hourlyRate:!0,totalBadges:!0,level:!0,isVerified:!0,isProfilePublic:!0}}},orderBy:{createdAt:"desc"}})).map(e=>{let t=[e.owner,...e.members].filter(e=>e.isProfilePublic).filter((e,t,a)=>t===a.findIndex(t=>t.id===e.id)).map(e=>({...e,winRate:e.totalCases>0?e.wonCases/e.totalCases*100:0})),a={totalLawyers:t.length,totalCases:t.reduce((e,t)=>e+t.totalCases,0),totalWonCases:t.reduce((e,t)=>e+t.wonCases,0),totalLostCases:t.reduce((e,t)=>e+t.lostCases,0),averageWinRate:t.length>0?t.reduce((e,t)=>e+t.winRate,0)/t.length:0,averageRating:t.length>0?t.reduce((e,t)=>e+(t.averageRating||0),0)/t.length:0,averageHourlyRate:t.length>0?t.reduce((e,t)=>e+(t.hourlyRate||0),0)/t.length:0,totalBadges:t.reduce((e,t)=>e+t.totalBadges,0),averageLevel:t.length>0?t.reduce((e,t)=>e+t.level,0)/t.length:0};return{...e,lawyers:t,firmStats:a}});t.status(200).json(e)}catch(e){console.error("Error fetching business profiles:",e),t.status(500).json({message:"Internal server error"})}}let u=(0,n.M)(r,"default"),d=(0,n.M)(r,"config"),c=new s.PagesAPIRouteModule({definition:{kind:i.A.PAGES_API,page:"/api/public/business-profiles",pathname:"/api/public/business-profiles",bundlePath:"",filename:""},userland:r})},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},76760:(e,t,a)=>{a.d(t,{z:()=>s});var r=a(96330);let s=globalThis.prisma??new r.PrismaClient({log:["error"]})},86435:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,a){return a in t?t[a]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,a)):"function"==typeof t&&"default"===a?t:void 0}}})},96330:e=>{e.exports=require("@prisma/client")}};var t=require("../../../webpack-api-runtime.js");t.C(e);var a=t(t.s=59037);module.exports=a})();

CasperSecurity Mini