mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
scheduled-messages: Update scheduled_message_id parameter for DELETE.
Updates the scheduled_message_id parameter for deleting scheduled messages to use the to_non_negative_int converter function for validation, which is used in other endpoints/views with an ID in the request path.
This commit is contained in:
committed by
Tim Abbott
parent
634a771a37
commit
b0b3230917
@@ -30,7 +30,9 @@ def fetch_scheduled_messages(request: HttpRequest, user_profile: UserProfile) ->
|
||||
|
||||
@has_request_variables
|
||||
def delete_scheduled_messages(
|
||||
request: HttpRequest, user_profile: UserProfile, scheduled_message_id: int
|
||||
request: HttpRequest,
|
||||
user_profile: UserProfile,
|
||||
scheduled_message_id: int = REQ(converter=to_non_negative_int, path_only=True),
|
||||
) -> HttpResponse:
|
||||
delete_scheduled_message(user_profile, scheduled_message_id)
|
||||
return json_success(request)
|
||||
|
||||
Reference in New Issue
Block a user