Remove obsolete /api/v1/subscriptions/add endpoint.

(imported from commit 838e3a29219acf157f16258a46b0719d97ae46de)
This commit is contained in:
Tim Abbott
2013-12-11 14:19:54 -05:00
parent 46760e91cd
commit 33cdf0d019
3 changed files with 2 additions and 13 deletions

View File

@@ -326,15 +326,10 @@ class AuthedTestCase(TestCase):
# Subscribe to a stream by making an API request
def common_subscribe_to_streams(self, email, streams, extra_post_data = {}, invite_only=False):
api_key = self.get_api_key(email)
post_data = {'email': email,
'api-key': api_key,
'subscriptions': ujson.dumps([{"name": stream} for stream in streams]),
post_data = {'subscriptions': ujson.dumps([{"name": stream} for stream in streams]),
'invite_only': ujson.dumps(invite_only)}
post_data.update(extra_post_data)
result = self.client.post("/api/v1/subscriptions/add", post_data)
result = self.client.post("/api/v1/users/me/subscriptions", post_data, **self.api_auth(email))
return result
def send_json_payload(self, email, url, payload, stream_name=None, **post_params):
@@ -512,7 +507,6 @@ class PublicURLTest(TestCase):
400: ["/api/v1/get_profile",
"/api/v1/get_old_messages",
"/api/v1/get_public_streams",
"/api/v1/subscriptions/add",
"/api/v1/send_message",
"/api/v1/update_pointer",
"/api/v1/external/github",

View File

@@ -1604,10 +1604,6 @@ def remove_subscriptions_backend(request, user_profile,
return json_success(result)
@authenticated_api_view
def api_add_subscriptions(request, user_profile):
return add_subscriptions_backend(request, user_profile)
@authenticated_json_post_view
def json_add_subscriptions(request, user_profile):
return add_subscriptions_backend(request, user_profile)

View File

@@ -143,7 +143,6 @@ urlpatterns += patterns('zerver.views',
url(r'^api/v1/get_profile$', 'api_get_profile'),
url(r'^api/v1/get_old_messages$', 'api_get_old_messages'),
url(r'^api/v1/get_public_streams$', 'api_get_public_streams'),
url(r'^api/v1/subscriptions/add$', 'api_add_subscriptions'),
url(r'^api/v1/send_message$', 'api_send_message'),
url(r'^api/v1/update_pointer$', 'api_update_pointer'),