Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorall committed Jul 23, 2024
1 parent d89e8a2 commit 59a235a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/handlers/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func CheckMyWork(w http.ResponseWriter, r *http.Request) {
column := header[colIndex]
item[column] = cell
c := numberToExcelColumn(colIndex)
i := c + strconv.Itoa(rowIndex)
i := c + strconv.Itoa(rowIndex+2)
if cell == "" {
if strInSlice(column, requiredFields) {
errors[i] = "Missing value"
Expand Down Expand Up @@ -147,6 +147,10 @@ func CheckMyWork(w http.ResponseWriter, r *http.Request) {
}
}

if len(errors) > 0 {
slog.Info("Errors detected", "errors", errors)
}

w.Header().Set("Content-Type", "application/json")
jsonResponse, err := json.Marshal(errors)
if err != nil {
Expand Down

0 comments on commit 59a235a

Please sign in to comment.