This commit is contained in:
2026-02-23 21:54:50 +07:00
parent 99bf57b154
commit 7853e94d2e
21 changed files with 65 additions and 65 deletions

View File

@@ -132,7 +132,7 @@ class ChatUI {
});
}
const { env, msg_json_str } = await smartsend(
const { env, env_json_str } = await smartsend(
`/chat/${this.currentRoom}`,
data,
{
@@ -304,7 +304,7 @@ class FileUploadService {
type: 'binary'
}];
const { env, msg_json_str } = await smartsend(
const { env, env_json_str } = await smartsend(
`/files/${recipient}`,
data,
{
@@ -534,7 +534,7 @@ class SensorSender:
data = [("reading", reading.to_dict(), "dictionary")]
# With is_publish=False, returns (envelope, json_str) without publishing
env, msg_json_str = smartsend(
env, env_json_str = smartsend(
f"/sensors/{sensor_id}/prepare",
data,
nats_url=self.nats_url,
@@ -543,9 +543,9 @@ class SensorSender:
)
# Now you can publish manually using NATS request-reply pattern
# nc.request(subject, msg_json_str, reply_to=reply_to_topic)
# nc.request(subject, env_json_str, reply_to=reply_to_topic)
return env, msg_json_str
return env, env_json_str
def send_batch(self, readings: List[SensorReading]):
batch = SensorBatch()
@@ -833,7 +833,7 @@ class DashboardUI {
async refreshData() {
// Request fresh data
const { env, msg_json_str } = await smartsend("/dashboard/request", [
const { env, env_json_str } = await smartsend("/dashboard/request", [
{ dataname: "request", data: { type: "refresh" }, type: "dictionary" }
], {
fileserverUrl: window.config.fileserver_url