Skip to content

Commit

Permalink
Fixed url for brewlogger
Browse files Browse the repository at this point in the history
  • Loading branch information
mp-se committed Oct 24, 2024
1 parent 35be980 commit f7fd966
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/brewlogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ SOFTWARE.
#include <kegconfig.hpp>
#include <log.hpp>

constexpr auto BREWLOGGER_API = "/api/pour/public";

void BrewLogger::sendPourInformation(UnitIndex idx, float pourVol,
float kegVol) {
if (strlen(myConfig.getBrewLoggerUrl()) == 0) return;
Expand All @@ -49,7 +51,9 @@ void BrewLogger::sendPourInformation(UnitIndex idx, float pourVol,
EspSerial.print(CR);
// #endif

out = _push->sendHttpPost(out, myConfig.getBrewLoggerUrl(),
String url = myConfig.getBrewLoggerUrl() + String(BREWLOGGER_API);

out = _push->sendHttpPost(out, url.c_str(),
"Content-Type: application/json", "");
updateStatus(out);
Log.info(F("BLOG: Response %s." CR), out.c_str());
Expand Down Expand Up @@ -77,7 +81,9 @@ void BrewLogger::sendKegInformation(UnitIndex idx, float kegVol) {
EspSerial.print(CR);
// #endif

out = _push->sendHttpPost(out, myConfig.getBrewLoggerUrl(),
String url = myConfig.getBrewLoggerUrl() + String(BREWLOGGER_API);

out = _push->sendHttpPost(out, url.c_str(),
"Content-Type: application/json", "");
updateStatus(out);
Log.info(F("BLOG: Response %s." CR), out.c_str());
Expand Down

0 comments on commit f7fd966

Please sign in to comment.