Skip to content

Commit c661cf6

Browse files
committed
v2 fix subsequent writes
1 parent 2a54395 commit c661cf6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

InfluxDb.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ boolean Influxdb::write(String data) {
153153
Serial.print(" --> writing to " + _db + ":\n");
154154
Serial.println(data);
155155
}
156+
if(_db_v == 2)
157+
http.addHeader("Authorization", "Token " + _token);
156158
int httpResponseCode = http.POST(data);
157159
Serial.print(" <-- Response: ");
158160
Serial.print(httpResponseCode);

0 commit comments

Comments
 (0)