mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-10-31 07:56:28 +00:00 
			
		
		
		
	Fix the /swap-indexes route API
1. payload 2. error messages 3. auth errors
This commit is contained in:
		
				
					committed by
					
						 Clément Renault
						Clément Renault
					
				
			
			
				
	
			
			
			
						parent
						
							92c41f0ef6
						
					
				
				
					commit
					2808be9d45
				
			| @@ -120,6 +120,8 @@ pub enum Code { | ||||
|     InvalidIndexUid, | ||||
|     InvalidMinWordLengthForTypo, | ||||
|  | ||||
|     DuplicateIndexFound, | ||||
|  | ||||
|     // invalid state error | ||||
|     InvalidState, | ||||
|     MissingPrimaryKey, | ||||
| @@ -298,6 +300,9 @@ impl Code { | ||||
|             InvalidMinWordLengthForTypo => { | ||||
|                 ErrCode::invalid("invalid_min_word_length_for_typo", StatusCode::BAD_REQUEST) | ||||
|             } | ||||
|             DuplicateIndexFound => { | ||||
|                 ErrCode::invalid("duplicate_index_found", StatusCode::BAD_REQUEST) | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -270,6 +270,7 @@ impl Action { | ||||
|             INDEXES_GET => Some(Self::IndexesGet), | ||||
|             INDEXES_UPDATE => Some(Self::IndexesUpdate), | ||||
|             INDEXES_DELETE => Some(Self::IndexesDelete), | ||||
|             INDEXES_SWAP => Some(Self::IndexesSwap), | ||||
|             TASKS_ALL => Some(Self::TasksAll), | ||||
|             TASKS_CANCEL => Some(Self::TasksCancel), | ||||
|             TASKS_DELETE => Some(Self::TasksDelete), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user