Merge pull request #9 from reiyawea/patch-1

Update holiday.cpp
This commit is contained in:
JADE Solution
2025-03-09 13:25:57 +08:00
committed by GitHub

View File

@@ -35,8 +35,7 @@ bool getHolidays(Holiday& result, int year, int month) {
}
http.end();
int status = doc["code"];
if (doc["code"] != 0) {
if (int status = doc["code"]) {
Serial.println("Get holidays error.");
return false;
}
@@ -59,4 +58,4 @@ bool getHolidays(Holiday& result, int year, int month) {
Serial.println();
result.length = i;
return true;
}
}