mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +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
parent
3b974d9ef7
commit
f9b79999ed
@@ -390,8 +390,8 @@ def add_realm_playground(client: Client) -> None:
|
||||
# Add a realm playground for Python
|
||||
request = {
|
||||
"name": "Python playground",
|
||||
"pygments_language": json.dumps("Python"),
|
||||
"url_prefix": json.dumps("https://python.example.com"),
|
||||
"pygments_language": "Python",
|
||||
"url_prefix": "https://python.example.com",
|
||||
}
|
||||
result = client.call_endpoint(url="/realm/playgrounds", method="POST", request=request)
|
||||
# {code_example|end}
|
||||
|
||||
Reference in New Issue
Block a user