mirror of
				https://github.com/zulip/zulip.git
				synced 2025-10-31 12:03:46 +00:00 
			
		
		
		
	playgrounds: Avoid json encoding each field in POST /realm/playgrounds.
This prevents us from having to json encode every field in the POST request to /realm/playgrounds, and keeps the client logic simpler when adding a playground.
This commit is contained in:
		
				
					committed by
					
						 Tim Abbott
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							3b974d9ef7
						
					
				
				
					commit
					f9b79999ed
				
			| @@ -5,7 +5,6 @@ | ||||
| # based on Zulip's OpenAPI definitions, as well as test setup and | ||||
| # fetching of appropriate parameter values to use when running the | ||||
| # cURL examples as part of the tools/test-api test suite. | ||||
| import json | ||||
| from functools import wraps | ||||
| from typing import Any, Callable, Dict, List, Optional, Set, Tuple | ||||
|  | ||||
| @@ -283,8 +282,8 @@ def upload_custom_emoji() -> Dict[str, object]: | ||||
| def add_realm_playground() -> Dict[str, object]: | ||||
|     return { | ||||
|         "name": "Python2 playground", | ||||
|         "pygments_language": json.dumps("Python2"), | ||||
|         "url_prefix": json.dumps("https://python2.example.com"), | ||||
|         "pygments_language": "Python2", | ||||
|         "url_prefix": "https://python2.example.com", | ||||
|     } | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user