mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 15:47:53 -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) {
|
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));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue