Remove legacy /api/v1/get_old_messages endpoint.

(imported from commit 2ca426f08f9f862e756a1fda55bb2764997aeb76)
This commit is contained in:
Tim Abbott
2013-12-11 14:40:28 -05:00
parent 795f716daf
commit 01428e5076
3 changed files with 3 additions and 11 deletions

View File

@@ -486,7 +486,9 @@ class PublicURLTest(TestCase):
get_urls = {200: ["/accounts/home/", "/accounts/login/"],
302: ["/"],
401: ["/api/v1/streams/Denmark/members",
"/api/v1/users/me/subscriptions",],
"/api/v1/users/me/subscriptions",
"/api/v1/messages",
],
}
post_urls = {200: ["/accounts/login/"],
302: ["/accounts/logout/"],
@@ -505,7 +507,6 @@ class PublicURLTest(TestCase):
"/api/v1/users/me/subscriptions",
],
400: ["/api/v1/get_profile",
"/api/v1/get_old_messages",
"/api/v1/send_message",
"/api/v1/update_pointer",
"/api/v1/external/github",

View File

@@ -907,14 +907,6 @@ def update_pointer_backend(request, user_profile,
def json_get_old_messages(request, user_profile):
return get_old_messages_backend(request, user_profile)
@authenticated_api_view
@has_request_variables
def api_get_old_messages(request, user_profile,
apply_markdown=REQ(default=False,
converter=ujson.loads)):
return get_old_messages_backend(request, user_profile,
apply_markdown=apply_markdown)
class BadNarrowOperator(Exception):
def __init__(self, desc):
self.desc = desc

View File

@@ -141,7 +141,6 @@ urlpatterns += patterns('zerver.views',
# These are json format views used by the API. They require an API key.
url(r'^api/v1/get_profile$', 'api_get_profile'),
url(r'^api/v1/get_old_messages$', 'api_get_old_messages'),
url(r'^api/v1/send_message$', 'api_send_message'),
url(r'^api/v1/update_pointer$', 'api_update_pointer'),