Skip to content

Commit

Permalink
fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
santolucito committed May 11, 2024
1 parent 67b26dc commit 82e2d78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ function logSpec(req, synthResult) {
var user = req.body.user;
var logEnabled = req.body.logEnabled;

console.log(logEnabled);

const project = 'tslapi-2';

// Build structured log messages as an object.
Expand Down Expand Up @@ -166,7 +168,7 @@ function logSpec(req, synthResult) {
);

// Serialize to a JSON string and output.
if (logEnabled) {
if (logEnabled === 'true') {
console.log(JSON.stringify(entry));
}
}
4 changes: 3 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
let targetLang = document.getElementById("targetLang").value;
let userVal = document.getElementById("userBox").value;
let logging = document.getElementById("logging").checked;
$.post("https://graphviz-web-vvxsiayuzq-ue.a.run.app/tslsynth", { tsl: tslSpec, target: targetLang, user: userVal, logEnabled: logging }, function (data) {
const urlEndpoint = 'http://localhost:8080/tslsynth'
//const urlEndpoint = "https://graphviz-web-vvxsiayuzq-ue.a.run.app/tslsynth"
$.post(urlEndpoint, { tsl: tslSpec, target: targetLang, user: userVal, logEnabled: logging }, function (data) {
document.getElementById("codeBox").value = data;
})
.fail(function (response) {
Expand Down

0 comments on commit 82e2d78

Please sign in to comment.