mirror of https://github.com/zulip/zulip.git
urls: Move /messages/render to POST endpoint
This commit is contained in:
parent
510659d402
commit
196cf4367b
|
@ -681,7 +681,7 @@ class Client(object):
|
|||
'''
|
||||
return self.call_endpoint(
|
||||
url='messages/render',
|
||||
method='GET',
|
||||
method='POST',
|
||||
request=request,
|
||||
)
|
||||
|
||||
|
|
|
@ -1038,7 +1038,7 @@ $(function () {
|
|||
// incorrect wrong, users will see a brief flicker).
|
||||
$("#preview_content").html(echo.apply_markdown(message));
|
||||
}
|
||||
channel.get({
|
||||
channel.post({
|
||||
url: '/json/messages/render',
|
||||
idempotent: true,
|
||||
data: {content: message},
|
||||
|
|
|
@ -839,7 +839,7 @@ class BugdownApiTests(ZulipTestCase):
|
|||
def test_render_message_api(self):
|
||||
# type: () -> None
|
||||
content = 'That is a **bold** statement'
|
||||
result = self.client_get(
|
||||
result = self.client_post(
|
||||
'/api/v1/messages/render',
|
||||
dict(content=content),
|
||||
**self.api_auth('othello@zulip.com')
|
||||
|
@ -853,7 +853,7 @@ class BugdownApiTests(ZulipTestCase):
|
|||
# type: () -> None
|
||||
"""Determines whether we're correctly passing the realm context"""
|
||||
content = 'This mentions #**Denmark** and @**King Hamlet**.'
|
||||
result = self.client_get(
|
||||
result = self.client_post(
|
||||
'/api/v1/messages/render',
|
||||
dict(content=content),
|
||||
**self.api_auth('othello@zulip.com')
|
||||
|
|
|
@ -213,7 +213,7 @@ v1_api_and_json_patterns = [
|
|||
{'GET': 'zerver.views.messages.json_fetch_raw_message',
|
||||
'PATCH': 'zerver.views.messages.json_update_message'}),
|
||||
url(r'^messages/render$', rest_dispatch,
|
||||
{'GET': 'zerver.views.messages.render_message_backend'}),
|
||||
{'POST': 'zerver.views.messages.render_message_backend'}),
|
||||
url(r'^messages/flags$', rest_dispatch,
|
||||
{'POST': 'zerver.views.messages.update_message_flags'}),
|
||||
|
||||
|
|
Loading…
Reference in New Issue