Skip to content

Commit

Permalink
uncomment registration api call
Browse files Browse the repository at this point in the history
  • Loading branch information
tcsullivan committed Jul 19, 2024
1 parent 644c4cb commit 286e729
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions noisemeter-device/noisemeter-device.ino
Original file line number Diff line number Diff line change
Expand Up @@ -283,15 +283,15 @@ std::optional<const char *> saveNetworkCreds(String ssid, String psk, String ema
if (email.length() > 0) {
API api (buildDeviceId());

//if (const auto reg = api.sendRegister(email); reg) {
if (const auto reg = api.sendRegister(email); reg) {
SERIAL.println("Registered!");
//Creds.set(Storage::Entry::Token, *reg);
//Creds.commit();
Creds.set(Storage::Entry::Token, *reg);
Creds.commit();

return {};
//} else {
// return "The sensor was not able to register with the server.";
//}
} else {
return "The sensor was not able to register with the server.";
}
} else {
return {};
}
Expand Down

0 comments on commit 286e729

Please sign in to comment.