mirror of
				https://github.com/zulip/zulip.git
				synced 2025-10-30 11:33:51 +00:00 
			
		
		
		
	drafts: Make the ID of the draft a part of the draft dict.
Then because the ID is now part of the draft dict, we can (and do) change the structure of the "drafts" parameter returned from `GET /drafts` from an object (mapping ID to data) to an array. Signed-off-by: Hemanth V. Alluri <hdrive1999@gmail.com>
This commit is contained in:
		
				
					committed by
					
						 Tim Abbott
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							8d59fd2f45
						
					
				
				
					commit
					99cf37dc51
				
			| @@ -87,7 +87,7 @@ def further_validated_draft_dict(draft_dict: Dict[str, Any], | ||||
|  | ||||
| def fetch_drafts(request: HttpRequest, user_profile: UserProfile) -> HttpResponse: | ||||
|     user_drafts = Draft.objects.filter(user_profile=user_profile).order_by("last_edit_time") | ||||
|     draft_dicts = {str(draft.id): draft.to_dict() for draft in user_drafts} | ||||
|     draft_dicts = [draft.to_dict() for draft in user_drafts] | ||||
|     return json_success({"count": user_drafts.count(), "drafts": draft_dicts}) | ||||
|  | ||||
| @has_request_variables | ||||
|   | ||||
		Reference in New Issue
	
	Block a user