Fix bug
This commit is contained in:
		
							parent
							
								
									94ba9c8437
								
							
						
					
					
						commit
						4e8033d5a4
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -116,7 +116,8 @@ async function deleteOldFile(user: IRemoteUser) {
 | 
			
		|||
	const oldFile = await DriveFile.findOne({
 | 
			
		||||
		_id: {
 | 
			
		||||
			$nin: [user.avatarId, user.bannerId]
 | 
			
		||||
		}
 | 
			
		||||
		},
 | 
			
		||||
		'metadata.userId': user._id
 | 
			
		||||
	}, {
 | 
			
		||||
		sort: {
 | 
			
		||||
			_id: 1
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue