Skip to content

Commit

Permalink
Fix Realtime database examples errors: set function types
Browse files Browse the repository at this point in the history
  • Loading branch information
mobizt committed Jul 2, 2024
1 parent 4c8798a commit 0cb852a
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ void loop()
Database.push<int>(aClient, "/test/int", 12345, asyncCB, "pushIntTask");

// Set int with custom UUID
Database.set<object_t>(aClient, path, 12345, asyncCB, "setTask");
Database.set<int>(aClient, path, 12345, asyncCB, "setTask");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void loop()
Database.push<int>(aClient, "/test/int", 12345, aResult_no_callback);

// Set int with custom UUID
Database.set<object_t>(aClient, path, 12345, aResult_no_callback);
Database.set<int>(aClient, path, 12345, aResult_no_callback);
}

printResult(aResult_no_callback);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ void loop()

Database.set<object_t>(aClient3, "/test/stream/path1/number", json, aResult_no_callback3);

Database.set<object_t>(aClient3, "/test/stream/path2/number", random(100000, 200000), aResult_no_callback3);
Database.set<int>(aClient3, "/test/stream/path2/number", random(100000, 200000), aResult_no_callback3);
}

printResult(aResult_no_callback1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ void setup()
// Set, push, and get double value

Serial.print("Set double... ");

status = Database.set<number_t>(client, "/test/double", number_t(1234.56789, 4));
if (status)
Serial.println("ok");
Expand All @@ -202,7 +201,6 @@ void setup()
// Set, push, and get JSON value

Serial.print("Set JSON... ");

status = Database.set<object_t>(client, "/test/json", object_t("{\"test\":{\"data\":123}}"));
if (status)
Serial.println("ok");
Expand All @@ -224,7 +222,6 @@ void setup()
// Set, push and get Array value

Serial.print("Set Array... ");

status = Database.set<object_t>(client, "/test/array", object_t("[1,2,\"test\",true]"));
if (status)
Serial.println("ok");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void loop()

// Set int with custom UUID.
Serial.print("Set int with custom UUID... ");
bool status = Database.set<object_t>(aClient, path, 12345);
bool status = Database.set<int>(aClient, path, 12345);

if (status)
Serial.println("ok");
Expand Down

0 comments on commit 0cb852a

Please sign in to comment.