backend instead of frontend start stop

This commit is contained in:
Justin 2023-07-17 19:10:43 +08:00 committed by GitHub
parent 15aff9507a
commit ecbc4b2673
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3175,16 +3175,13 @@ function savePrompt() {
setTimeout( setTimeout(
function() { function() {
document.getElementById('saved-msg-feedback').style.display = "block"; document.getElementById('saved-msg-feedback').style.display = "block";
fetch("/stop", { fetch("/savePromptStartStop", {
method: "GET", method: "PUT",
}); });
}, 100); }, 100);
setTimeout( setTimeout(
function() { function() {
document.getElementById('saved-msg-feedback').style.display = "none"; document.getElementById('saved-msg-feedback').style.display = "none";
fetch("/start", {
method: "PUT",
});
}, 3000); }, 3000);
} }