Switch message count to new endpoint

This commit is contained in:
Matthew Taylor 2017-10-03 16:37:00 -04:00
parent ea1b4248e4
commit 75217978c1

View file

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