MCPcopy Create free account
hub / github.com/UtilitechAS/amsreader-firmware / dayplotJson

Method dayplotJson

lib/SvelteUi/src/AmsWebServer.cpp:668–684  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

666}
667
668void AmsWebServer::dayplotJson() {
669 if(!checkSecurity(2))
670 return;
671
672 if(ds == NULL) {
673 notFound();
674 } else {
675 AmsJsonGenerator::generateDayPlotJson(ds, buf, BufferSize);
676 addConditionalCloudHeaders();
677 server.sendHeader(HEADER_CACHE_CONTROL, CACHE_CONTROL_NO_CACHE);
678 server.sendHeader(HEADER_PRAGMA, PRAGMA_NO_CACHE);
679 server.sendHeader(HEADER_EXPIRES, EXPIRES_OFF);
680
681 server.setContentLength(strlen(buf));
682 server.send(200, MIME_JSON, buf);
683 }
684}
685
686void AmsWebServer::monthplotJson() {
687 if(!checkSecurity(2))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected