fix status response

This commit is contained in:
Jakob Ketterl 2023-05-15 18:09:06 +02:00
parent 3a8caedc67
commit d3f1ea4819

View file

@ -23,7 +23,7 @@ class StatusController(ReceiverIdController):
"name": receiver.getName(),
# TODO would be better to have types from the config here
"type": type(receiver).__name__,
"profiles": [self.getProfileStats(p) for p in receiver.getProfiles().values()],
"profiles": [self.getProfileStats(p) for p in receiver.getProfiles()],
}
return stats
@ -39,6 +39,6 @@ class StatusController(ReceiverIdController):
},
"max_clients": pm["max_clients"],
"version": openwebrx_version,
"sdrs": [self.getReceiverStats(r) for r in SdrService.getActiveSources().values()],
"sdrs": [self.getReceiverStats(r) for r in SdrService.getActiveSources()],
}
self.send_response(json.dumps(status, cls=Encoder), content_type="application/json")