Bug fixes

This commit is contained in:
clarkerubber 2015-01-20 02:17:15 +11:00
parent 05e284067a
commit 22326910a7
2 changed files with 7 additions and 10 deletions

View file

@ -109,7 +109,7 @@ object Mod extends LilaController {
Form(single("assess" -> text)).bindFromRequest.fold(
err => fuccess(BadRequest),
text => assessApi.refreshAssess(text)
gameId => assessApi.refreshAssess(gameId)
)
}

View file

@ -2023,17 +2023,14 @@ lichess.storage = {
}
});
$('#whiteAssessment').change(function() {
$.post('/mod/' + data.game.id + '/white/assess', {
assessment: $(this).val()
function sendAssessment(side, value) {
$.post('/mod/' + data.game.id + '/' + side + '/assess', {
assessment: value
});
});
}
$('#blackAssessment').change(function() {
$.post('/mod/' + data.game.id + '/black/assess', {
assessment: $(this).val()
});
});
$('#whiteAssessment').change(sendAssessment('white', $(this).val()));
$('#blackAssessment').change(sendAssessment('black', $(this).val()));
$('#refreshAssessment').click(function() {
$.post('/mod/refreshAssess', {