Replace /json/get_profile with REST style route.

This commit is contained in:
Ashish 2016-04-02 23:37:28 +05:30 committed by Tim Abbott
parent 679b4e5807
commit b8ec8f5ef0
2 changed files with 4 additions and 4 deletions

View File

@ -262,8 +262,8 @@ function unconditionally_send_pointer_update() {
} }
function fast_forward_pointer() { function fast_forward_pointer() {
channel.post({ channel.get({
url: '/json/get_profile', url: '/users/me',
idempotent: true, idempotent: true,
data: {email: page_params.email}, data: {email: page_params.email},
success: function (data) { success: function (data) {

View File

@ -1078,14 +1078,14 @@ class GetProfileTest(AuthedTestCase):
def test_api_get_empty_profile(self): 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") json = self.common_get_profile("othello@zulip.com")
self.assertEqual(json["pointer"], -1) self.assertEqual(json["pointer"], -1)
def test_profile_with_pointer(self): 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) id1 = self.send_message("othello@zulip.com", "Verona", Recipient.STREAM)