in website/index/index.js [99:126]
function reformatEditor() {
disableDemoUi();
$.ajax({
type: "POST",
url: "https://8uj6xa47qa.execute-api.us-east-2.amazonaws.com/ktfmt",
contentType: "application/json",
data: JSON.stringify({
source: editor.getValue(),
maxWidth: columnLimit,
style: style,
}),
dataType: "json",
error: function (xhr, errorType, errorThrown) {
showError(errorThrown);
},
})
.done(function (data) {
if (data.err) {
showError(data.err);
} else {
$("#error-message").hide();
editor.setValue(data.source);
}
})
.always(function () {
enableDemoUi();
});
}