drafts: Add an API endpoint for creating drafts.

This endpoint will allow a user to create drafts in bulk.

Signed-off-by: Hemanth V. Alluri <hdrive1999@gmail.com>
This commit is contained in:
Hemanth V. Alluri
2020-07-21 21:34:50 +05:30
committed by Tim Abbott
parent 0e893b9045
commit a0f71b7458
3 changed files with 413 additions and 0 deletions

View File

@@ -193,6 +193,11 @@ v1_api_and_json_patterns = [
path('zcommand', rest_dispatch,
{'POST': 'zerver.views.message_send.zcommand_backend'}),
# Endpoints for syncing drafts.
path('drafts', rest_dispatch,
{'POST': ('zerver.views.drafts.create_drafts',
{'intentionally_undocumented'})}),
# messages -> zerver.views.message*
# GET returns messages, possibly filtered, POST sends a message
path('messages', rest_dispatch,