mirror of https://github.com/zulip/zulip.git
Remove now-unused /json/get_events endpoint.
This commit is contained in:
parent
b3b85202bc
commit
9b7a3f040c
|
@ -14,7 +14,7 @@ location /static/ {
|
|||
}
|
||||
|
||||
# Send longpoll requests to Tornado
|
||||
location ~ /json/get_events|/json/events {
|
||||
location ~ /json/events {
|
||||
proxy_pass http://tornado;
|
||||
include /etc/nginx/zulip-include/proxy_longpolling;
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ server {
|
|||
include /etc/nginx/zulip-include/location-sockjs;
|
||||
}
|
||||
|
||||
location ~ /json/get_events|/json/events|/api/v1/events {
|
||||
location ~ /json/events|/api/v1/events {
|
||||
proxy_pass https://staging;
|
||||
include /etc/nginx/zulip-include/proxy_longpolling;
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ server {
|
|||
include /etc/nginx/zulip-include/location-sockjs;
|
||||
}
|
||||
|
||||
location ~ /json/get_events|/json/events|/api/v1/events {
|
||||
location ~ /json/events|/api/v1/events {
|
||||
proxy_pass https://prod;
|
||||
include /etc/nginx/zulip-include/proxy_longpolling;
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ class ZulipSession extends Session
|
|||
@on_app_load(cb)
|
||||
|
||||
get_events: ->
|
||||
@post '/json/get_events', {
|
||||
@get '/json/events', {
|
||||
@pointer
|
||||
last: @max_message_id
|
||||
dont_block: false
|
||||
|
|
|
@ -133,8 +133,7 @@ class Resource(resource.Resource):
|
|||
# Assume an HTTP 1.1 request
|
||||
proxy_host = request.requestHeaders.getRawHeaders('Host')
|
||||
request.requestHeaders.setRawHeaders('X-Forwarded-Host', proxy_host)
|
||||
if (request.uri in [b'/json/get_events'] or
|
||||
request.uri.startswith(b'/json/events') or
|
||||
if (request.uri.startswith(b'/json/events') or
|
||||
request.uri.startswith(b'/api/v1/events') or
|
||||
request.uri.startswith(b'/sockjs')):
|
||||
return proxy.ReverseProxyResource('127.0.0.1', tornado_port, b'/' + name)
|
||||
|
|
|
@ -103,7 +103,6 @@ class Command(BaseCommand):
|
|||
|
||||
try:
|
||||
urls = (r"/notify_tornado",
|
||||
r"/json/get_events",
|
||||
r"/json/events",
|
||||
r"/api/v1/events",
|
||||
)
|
||||
|
|
|
@ -39,11 +39,6 @@ def cleanup_event_queue(request, user_profile, queue_id=REQ()):
|
|||
client.cleanup()
|
||||
return json_success()
|
||||
|
||||
@authenticated_json_post_view
|
||||
def json_get_events(request, user_profile):
|
||||
# type: (HttpRequest, UserProfile) -> Union[HttpResponse, _RespondAsynchronously]
|
||||
return get_events_backend(request, user_profile, apply_markdown=True)
|
||||
|
||||
@asynchronous
|
||||
@has_request_variables
|
||||
def get_events_backend(request, user_profile, handler,
|
||||
|
|
|
@ -291,7 +291,6 @@ for app_name in settings.EXTRA_INSTALLED_APPS:
|
|||
|
||||
# Tornado views
|
||||
urls += [
|
||||
url(r'^json/get_events$', 'zerver.tornadoviews.json_get_events'),
|
||||
# Used internally for communication between Django and Tornado processes
|
||||
url(r'^notify_tornado$', 'zerver.tornadoviews.notify'),
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue