mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 07:38:07 -05:00
Merge pull request #1591 from mewtaylor/hotfix/message-count-endpoint
[Master] Hotfix: change message count endpoint
This commit is contained in:
commit
bd8c3d6dd0
1 changed files with 2 additions and 2 deletions
|
@ -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));
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue