Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
docs: Update mentions of json_success in documentation.
Lauryn Menardc2b6e76af7fb
diff --git a/docs/tutorials/life-of-a-request.md b/docs/tutorials/life-of-a-request.mdindex 024ed7b3c69..3cf6c983ea4 100644--- a/docs/tutorials/life-of-a-request.md+++ b/docs/tutorials/life-of-a-request.md@@ -203,8 +203,13 @@ in awith a content type of 'application/json'.To pass back data from the server to the calling client, in the event of-a successfully handled request, we use-`json_success(data=<some python object which can be converted to a JSON string>)`.+a successfully handled request, we use `json_success(request, data)`.++The request argument is a+[HTTP request](https://docs.djangoproject.com/en/3.2/ref/request-response/)+with additional metadata that Zulip associates with the request object.+The data argument is a python object which can be converted to a JSON string+and has a default value of an empty python dictionary.This will result in a JSON string:diff --git a/templates/zerver/api/incoming-webhooks-walkthrough.md b/templates/zerver/api/incoming-webhooks-walkthrough.mdindex 27aa99c12eb..d66656f5c0b 100644--- a/templates/zerver/api/incoming-webhooks-walkthrough.md+++ b/templates/zerver/api/incoming-webhooks-walkthrough.md@@ -115,7 +115,7 @@ def api_helloworld_webhook(# send the messagecheck_send_webhook_message(request, user_profile, topic, body)- return json_success()+ return json_success(request)```The above code imports the required functions and defines the main webhook@@ -175,7 +175,7 @@ validate the message and do the following:message to the owner of the webhook bot.Finally, we return a 200 http status with a JSON format success message via-`json_success()`.+`json_success(request)`.## Step 3: Create an API endpoint for the webhook