Merge pull request #1591 from mewtaylor/hotfix/message-count-endpoint

[Master] Hotfix: change message count endpoint
This commit is contained in:
Matthew Taylor 2017-10-03 17:25:44 -04:00 committed by GitHub
commit bd8c3d6dd0

View file

@ -56,14 +56,14 @@ module.exports.getCount = function (username) {
return function (dispatch) { return function (dispatch) {
api({ api({
method: 'get', method: 'get',
uri: '/proxy/users/' + username + '/activity/count' uri: '/users/' + username + '/messages/count'
}, function (err, body) { }, function (err, body) {
if (err) { if (err) {
dispatch(module.exports.setCount(0)); dispatch(module.exports.setCount(0));
dispatch(module.exports.setSessionError(err)); dispatch(module.exports.setSessionError(err));
return; return;
} }
var count = parseInt(body.msg_count, 10); var count = parseInt(body.count, 10);
dispatch(module.exports.setCount(count)); dispatch(module.exports.setCount(count));
}); });
}; };