Browse Source
			
			
			Fix bulk collection deletion
			
				The bulk collection delete seems to have removed the extra org_id in the
posted data. Now we only use the org_id from the path.
Fixes #4253
			
			
				pull/4257/head
			
			
		 
		
			
				
					
						 BlackDex
					
					2 years ago
						BlackDex
					
					2 years ago
					
				 
				
			 
		 
		
			
				
					
					No known key found for this signature in database
					
						
							GPG Key ID: 58C80A2AA6C765E1
						
					
				
			
		
		
		
	
		
			
				 1 changed files with 
0 additions and 
4 deletions
			 
			
		 
		
			
				- 
					
					
					 
					src/api/core/organizations.rs
				
				
				
					
						
							
								
									
	
		
		
			
				
					|  | @ -611,7 +611,6 @@ async fn post_organization_collection_delete( | 
			
		
	
		
		
			
				
					|  |  | #[allow(non_snake_case)] |  |  | #[allow(non_snake_case)] | 
			
		
	
		
		
			
				
					|  |  | struct BulkCollectionIds { |  |  | struct BulkCollectionIds { | 
			
		
	
		
		
			
				
					|  |  |     Ids: Vec<String>, |  |  |     Ids: Vec<String>, | 
			
		
	
		
		
			
				
					|  |  |     OrganizationId: String, |  |  |  | 
			
		
	
		
		
			
				
					|  |  | } |  |  | } | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | #[delete("/organizations/<org_id>/collections", data = "<data>")] |  |  | #[delete("/organizations/<org_id>/collections", data = "<data>")] | 
			
		
	
	
		
		
			
				
					|  | @ -622,9 +621,6 @@ async fn bulk_delete_organization_collections( | 
			
		
	
		
		
			
				
					|  |  |     mut conn: DbConn, |  |  |     mut conn: DbConn, | 
			
		
	
		
		
			
				
					|  |  | ) -> EmptyResult { |  |  | ) -> EmptyResult { | 
			
		
	
		
		
			
				
					|  |  |     let data: BulkCollectionIds = data.into_inner().data; |  |  |     let data: BulkCollectionIds = data.into_inner().data; | 
			
		
	
		
		
			
				
					|  |  |     if org_id != data.OrganizationId { |  |  |  | 
			
		
	
		
		
			
				
					|  |  |         err!("OrganizationId mismatch"); |  |  |  | 
			
		
	
		
		
			
				
					|  |  |     } |  |  |  | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |     let collections = data.Ids; |  |  |     let collections = data.Ids; | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  | 
 |