Bug fixes
This commit is contained in:
parent
05e284067a
commit
22326910a7
|
@ -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)
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -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', {
|
||||
|
|
Loading…
Reference in a new issue