From b8ec8f5ef0810d748dedee2b029fa4325263cca2 Mon Sep 17 00:00:00 2001 From: Ashish Date: Sat, 2 Apr 2016 23:37:28 +0530 Subject: [PATCH] Replace /json/get_profile with REST style route. --- static/js/zulip.js | 4 ++-- zerver/tests.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/static/js/zulip.js b/static/js/zulip.js index 3d4c3b5331..deec10828f 100644 --- a/static/js/zulip.js +++ b/static/js/zulip.js @@ -262,8 +262,8 @@ function unconditionally_send_pointer_update() { } function fast_forward_pointer() { - channel.post({ - url: '/json/get_profile', + channel.get({ + url: '/users/me', idempotent: true, data: {email: page_params.email}, success: function (data) { diff --git a/zerver/tests.py b/zerver/tests.py index ec7876d4bc..410093b72a 100644 --- a/zerver/tests.py +++ b/zerver/tests.py @@ -1078,14 +1078,14 @@ class GetProfileTest(AuthedTestCase): def test_api_get_empty_profile(self): """ - Ensure get_profile returns a max message id and returns successfully + Ensure GET /users/me returns a max message id and returns successfully """ json = self.common_get_profile("othello@zulip.com") self.assertEqual(json["pointer"], -1) def test_profile_with_pointer(self): """ - Ensure get_profile returns a proper pointer id after the pointer is updated + Ensure GET /users/me returns a proper pointer id after the pointer is updated """ id1 = self.send_message("othello@zulip.com", "Verona", Recipient.STREAM)