mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
Fixed comment updating after voting on it
It reported bad score until user has refreshed the page.
This commit is contained in:
@ -210,8 +210,8 @@ App.Presenters.PostCommentListPresenter = function(
|
||||
function score(comment, scoreValue) {
|
||||
promise.wait(api.post('/comments/' + comment.id + '/score', {score: scoreValue}))
|
||||
.then(function(response) {
|
||||
comment.score = response.json.score;
|
||||
comment.ownScore = parseInt(response.json.score);
|
||||
comment.score = parseInt(response.json.score);
|
||||
comment.ownScore = parseInt(response.json.ownScore);
|
||||
updateComment(comment);
|
||||
}).fail(showGenericError);
|
||||
}
|
||||
|
Reference in New Issue
Block a user