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/investigator/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/domains/lavocat.ca/private_html/.next/server/pages/api/investigator/profile.js
"use strict";(()=>{var e={};e.id=570,e.ids=[570],e.modules={4722:e=>{e.exports=require("next-auth/react")},8667:(e,t)=>{Object.defineProperty(t,"A",{enumerable:!0,get:function(){return i}});var i=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,i)=>{e.exports=i(75600)},75600:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},86435:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,i){return i in t?t[i]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,i)):"function"==typeof t&&"default"===i?t:void 0}}})},90707:(e,t,i)=>{i.r(t),i.d(t,{config:()=>d,default:()=>c,routeModule:()=>p});var r={};i.r(r),i.d(r,{default:()=>u});var o=i(33480),s=i(8667),a=i(86435),n=i(4722);let l=new(i(96330)).PrismaClient;async function u(e,t){let i=await (0,n.getSession)({req:e});if(!i)return t.status(401).json({message:"Unauthorized"});if(i.user?.role!=="INVESTIGATOR")return t.status(403).json({message:"Forbidden: Investigator access required"});let r=i.user.id;if("GET"===e.method)try{let e=await l.user.findUnique({where:{id:r},select:{id:!0,name:!0,email:!0,title:!0,bio:!0,profilePicture:!0,phone:!0,workPhone:!0,officeLocation:!0,timezone:!0,websiteUrl:!0,linkedinUrl:!0,isProfilePublic:!0,availability:!0,pronouns:!0,yearsOfExperience:!0,hourlyRate:!0,specialization:!0,education:!0,certifications:!0,proBono:!0,averageRating:!0,totalCases:!0,wonCases:!0,lostCases:!0}});if(!e)return t.status(404).json({message:"User not found"});let i={id:e.id,userId:e.id,name:e.name||"",email:e.email,title:e.title||"Investigator",bio:e.bio||"",profilePicture:e.profilePicture||"",phone:e.phone||"",workPhone:e.workPhone||"",officeLocation:e.officeLocation||"",timezone:e.timezone||"",websiteUrl:e.websiteUrl||"",linkedinUrl:e.linkedinUrl||"",isProfilePublic:e.isProfilePublic||!1,availability:e.availability||"",pronouns:e.pronouns||"",yearsOfExperience:e.yearsOfExperience||0,hourlyRate:e.hourlyRate||0,investigationTypes:e.specialization||"",toolsAndMethods:"",caseSuccessRate:e.wonCases&&e.totalCases?e.wonCases/e.totalCases*100:0,surveillanceCapabilities:"",reportWritingServices:"",certifications:e.certifications||"",totalInvestigations:e.totalCases||0,projectRate:0};t.status(200).json(i)}catch(e){console.error("Error fetching investigator profile:",e),t.status(500).json({message:"Internal server error"})}else if("PUT"===e.method)try{let{name:i,title:o,bio:s,profilePicture:a,phone:n,workPhone:u,officeLocation:c,timezone:d,websiteUrl:p,linkedinUrl:f,isProfilePublic:P,availability:m,pronouns:g,yearsOfExperience:h,hourlyRate:v,investigationTypes:A,toolsAndMethods:b,caseSuccessRate:y,surveillanceCapabilities:E,reportWritingServices:w,certifications:I,totalInvestigations:j,projectRate:C}=e.body,R=j&&y?Math.round(j*y/100):0,U=await l.user.update({where:{id:r},data:{name:i,title:o,bio:s,profilePicture:a,phone:n,workPhone:u,officeLocation:c,timezone:d,websiteUrl:p,linkedinUrl:f,isProfilePublic:P,availability:m,pronouns:g,yearsOfExperience:parseInt(h)||0,hourlyRate:parseFloat(v)||0,specialization:A,certifications:I,totalCases:parseInt(j)||0,wonCases:R,lostCases:parseInt(j)-R,education:`${b} | Surveillance: ${E} | Report Services: ${w} | Project Rate: $${C}`}});t.status(200).json({message:"Profile updated successfully",user:U})}catch(e){console.error("Error updating investigator profile:",e),t.status(500).json({message:"Internal server error"})}else t.setHeader("Allow",["GET","PUT"]),t.status(405).json({message:`Method ${e.method} Not Allowed`})}let c=(0,a.M)(r,"default"),d=(0,a.M)(r,"config"),p=new o.PagesAPIRouteModule({definition:{kind:s.A.PAGES_API,page:"/api/investigator/profile",pathname:"/api/investigator/profile",bundlePath:"",filename:""},userland:r})},96330:e=>{e.exports=require("@prisma/client")}};var t=require("../../../webpack-api-runtime.js");t.C(e);var i=t(t.s=90707);module.exports=i})();

CasperSecurity Mini