|  |  |  | @ -1271,11 +1271,12 @@ fastify.post("/api/uploads_installation_TeamMember_profile/:installationId/:team | 
			
		
	
		
			
				
					|  |  |  |  |     const publicUrl = `https://storage.googleapis.com/${bucketName}/${filePath}`; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     // Always upsert the installation-level picture doc
 | 
			
		
	
		
			
				
					|  |  |  |  |     await ProfilePictureInstall.findOneAndUpdate( | 
			
		
	
		
			
				
					|  |  |  |  |       { installationId }, | 
			
		
	
		
			
				
					|  |  |  |  |       { picture: publicUrl }, | 
			
		
	
		
			
				
					|  |  |  |  |       { new: true, upsert: true } | 
			
		
	
		
			
				
					|  |  |  |  |     ); | 
			
		
	
		
			
				
					|  |  |  |  |  await ProfilePictureInstallTeamMember.findOneAndUpdate( | 
			
		
	
		
			
				
					|  |  |  |  |   { installationId, teamMemberId }, | 
			
		
	
		
			
				
					|  |  |  |  |   { picture: publicUrl }, | 
			
		
	
		
			
				
					|  |  |  |  |   { new: true, upsert: true } | 
			
		
	
		
			
				
					|  |  |  |  | ); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     // Update department picture where departmentId === installationId
 | 
			
		
	
		
			
				
					|  |  |  |  |     const deptUpdate = await Deparments.findOneAndUpdate( | 
			
		
	
	
		
			
				
					|  |  |  | 
 |