mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
realm/playground: Add API endpoint for deleting a playground entry.
Similar to the previous commit, we have added a `do_*` function
which does the deletion from the DB. The next commit handles sending
the events when both adding and deleting a playground entry.
Added the openAPI format data to zulip.yaml for DELETE
/realm/playgrounds/{playground_id}. Also added python and curl
examples to remove-playground.md.
Tests added.
This commit is contained in:
@@ -396,6 +396,17 @@ def add_realm_playground(client: Client) -> None:
|
||||
validate_against_openapi_schema(result, "/realm/playgrounds", "post", "200")
|
||||
|
||||
|
||||
@openapi_test_function("/realm/playgrounds/{playground_id}:delete")
|
||||
def remove_realm_playground(client: Client) -> None:
|
||||
|
||||
# {code_example|start}
|
||||
# Remove the playground with ID 1
|
||||
result = client.call_endpoint(url="/realm/playgrounds/1", method="DELETE")
|
||||
# {code_example|end}
|
||||
|
||||
validate_against_openapi_schema(result, "/realm/playgrounds/{playground_id}", "delete", "200")
|
||||
|
||||
|
||||
@openapi_test_function("/users/me:get")
|
||||
def get_profile(client: Client) -> None:
|
||||
|
||||
@@ -1436,6 +1447,7 @@ def test_server_organizations(client: Client) -> None:
|
||||
add_realm_playground(client)
|
||||
get_server_settings(client)
|
||||
remove_realm_filter(client)
|
||||
remove_realm_playground(client)
|
||||
get_realm_emoji(client)
|
||||
upload_custom_emoji(client)
|
||||
get_realm_profile_fields(client)
|
||||
|
||||
Reference in New Issue
Block a user