zulip/zerver
Lauryn Menard 31daef7f79 response: Remove "result: partially_completed" for success responses.
In feature levels 153 and 154, a new value of "partially_completed"
for `result` in a success (HTTP status code 200) was added for two
endpoints that process messages in batches: /api/delete-topic and
/api/mark-all-as-read.

Prior to these changes, `result` was either "success" or "error" for
all responses, which was a useful API invariant to have for clients.

So, here we remove "partially_completed" as a potential value for
"result" in a response. And instead, for the two endpoints noted
above, we return a boolean field "complete" to indicate if the
response successfully deleted/marked as read all the targeted
messages (complete: true) or if only some of the targeted messages
were processed (complete: false).

The "code" field for an error string that was also returned as part
of a partially completed response is removed in these changes as
well.

The web app does not currently use the /api/mark-all-as-read
endpoint, but it does use the /api/delete-topic endpoint, so these
changes update that to check the `complete` boolean instead of the
string value for `result`.
2023-09-18 13:18:24 -07:00
..
actions emails: Update subject for confirm_new_email to have realm host. 2023-09-17 15:12:21 -07:00
data_import python: Elide unnecessary list wrappers. 2023-09-13 12:41:23 -07:00
integration_fixtures/nagios
lib response: Remove "result: partially_completed" for success responses. 2023-09-18 13:18:24 -07:00
management python: Elide unnecessary list wrappers. 2023-09-13 12:41:23 -07:00
migrations user_settings: Add new `web_stream_unreads_count_display_policy` field. 2023-09-13 18:45:45 -07:00
openapi response: Remove "result: partially_completed" for success responses. 2023-09-18 13:18:24 -07:00
tests response: Remove "result: partially_completed" for success responses. 2023-09-18 13:18:24 -07:00
tornado python: Delete superfluous parens. 2023-09-13 13:40:19 -07:00
transaction_tests docs: Fix typos caught by ‘typos’. 2023-09-06 18:59:05 -07:00
views response: Remove "result: partially_completed" for success responses. 2023-09-18 13:18:24 -07:00
webhooks python: Delete superfluous parens. 2023-09-13 13:40:19 -07:00
worker python: Replace functools.partial with type-safe returns.curry.partial. 2023-09-11 18:03:45 -07:00
__init__.py
apps.py requirements: Upgrade Python requirements. 2023-04-03 22:39:21 -07:00
context_processors.py emails: Add corporate_enabled to context for emails. 2023-05-01 10:32:43 -07:00
decorator.py logging_util: Remove dependence on get_current_request. 2023-07-11 22:23:47 -07:00
filters.py error_notify: Remove custom email error reporting handler. 2023-07-20 11:00:09 -07:00
forms.py python: Convert translated positional {} fields to {named} fields. 2023-07-18 15:19:07 -07:00
logging_handlers.py error_notify: Remove custom email error reporting handler. 2023-07-20 11:00:09 -07:00
middleware.py nginx: Suppress proxy warnings when the proxy itself sent the request. 2023-09-12 10:10:58 -07:00
models.py user_settings: Add new `web_stream_unreads_count_display_policy` field. 2023-09-13 18:45:45 -07:00
signals.py demo-orgs: Create dev environment demo organization without email. 2023-08-31 15:02:16 -07:00