mirror of
https://github.com/zulip/zulip.git
synced 2026-06-24 21:08:25 +08:00
Remove legacy /api/v1/get_profile endpoint.
(imported from commit c8e78be4c8549022556099cc13342627323c0b01)
This commit is contained in:
parent
01428e5076
commit
0c79465950
@ -506,8 +506,7 @@ class PublicURLTest(TestCase):
|
||||
"/json/fetch_api_key",
|
||||
"/api/v1/users/me/subscriptions",
|
||||
],
|
||||
400: ["/api/v1/get_profile",
|
||||
"/api/v1/send_message",
|
||||
400: ["/api/v1/send_message",
|
||||
"/api/v1/update_pointer",
|
||||
"/api/v1/external/github",
|
||||
"/api/v1/fetch_api_key",
|
||||
@ -2614,8 +2613,7 @@ class GetProfileTest(AuthedTestCase):
|
||||
user_profile = get_user_profile_by_email(email)
|
||||
self.send_message(email, "Verona", Recipient.STREAM, "hello")
|
||||
|
||||
api_key = self.get_api_key(email)
|
||||
result = self.client.post("/api/v1/get_profile", {'email': email, 'api-key': api_key})
|
||||
result = self.client.get("/api/v1/users/me", **self.api_auth(email))
|
||||
|
||||
max_id = most_recent_message(user_profile).id
|
||||
|
||||
|
||||
@ -1263,10 +1263,6 @@ def generate_client_id():
|
||||
def json_get_profile(request, user_profile):
|
||||
return get_profile_backend(request, user_profile)
|
||||
|
||||
@authenticated_api_view
|
||||
def api_get_profile(request, user_profile):
|
||||
return get_profile_backend(request, user_profile)
|
||||
|
||||
def get_profile_backend(request, user_profile):
|
||||
result = dict(pointer = user_profile.pointer,
|
||||
client_id = generate_client_id(),
|
||||
|
||||
@ -140,7 +140,6 @@ urlpatterns += patterns('zerver.views',
|
||||
url(r'^json/set_avatar$', 'json_set_avatar'),
|
||||
|
||||
# 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/send_message$', 'api_send_message'),
|
||||
url(r'^api/v1/update_pointer$', 'api_update_pointer'),
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user