refactoring

This commit is contained in:
Maxim Devaev
2024-09-22 22:14:36 +03:00
parent 1217144ecd
commit 5ed368769c
13 changed files with 48 additions and 38 deletions

View File

@@ -295,7 +295,7 @@ export function Streamer() {
wm.confirm("Are you sure you want to reset stream?").then(function (ok) {
if (ok) {
__resetStream();
tools.httpPost("/api/streamer/reset", function(http) {
tools.httpPost("/api/streamer/reset", null, function(http) {
if (http.status !== 200) {
wm.error("Can't reset stream:<br>", http.responseText);
}
@@ -305,7 +305,7 @@ export function Streamer() {
};
var __sendParam = function(name, value) {
tools.httpPost(`/api/streamer/set_params?${name}=${value}`, function(http) {
tools.httpPost("/api/streamer/set_params", {[name]: value}, function(http) {
if (http.status !== 200) {
wm.error("Can't configure stream:<br>", http.responseText);
}