From 286e7293c4c266d1a76e50dcd78823d78212d178 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Fri, 19 Jul 2024 07:24:18 -0400 Subject: [PATCH] uncomment registration api call --- noisemeter-device/noisemeter-device.ino | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/noisemeter-device/noisemeter-device.ino b/noisemeter-device/noisemeter-device.ino index 1c162d4..e8e64b2 100644 --- a/noisemeter-device/noisemeter-device.ino +++ b/noisemeter-device/noisemeter-device.ino @@ -283,15 +283,15 @@ std::optional 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 {}; }