Write into empty log fix

This commit is contained in:
Michał Zieliński
2023-08-31 16:54:04 +02:00
parent 11275af4af
commit 0be0ce4b1c
3 changed files with 68 additions and 65 deletions

View File

@@ -35,7 +35,10 @@ namespace WebAPI.Controllers
}
var response = googleSheetValues.Get(configuration["appLogsFile"], $"{type}!A:A").Execute();
var data = response.Values;
int row = data.Count + 1;
int row = 1;
if (data != null) {
row = data.Count + 1;
}
var range = $"{type}!A{row}:D{row}";
List<object> logRow = new List<object>