Skip to content

Commit

Permalink
Set status to skipped if running solve
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Veld committed Aug 16, 2023
1 parent a9d76b4 commit 685be99
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions pkg/server/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,14 @@ func (a *API) validation(w http.ResponseWriter, r *http.Request) {
}

if status == "" {
status = "completed"
if action == "solve" {
status = "skipped"
} else {
status = "completed"
}

// TODO: account for more states?

completed++
}

Expand All @@ -183,7 +190,11 @@ func (a *API) validation(w http.ResponseWriter, r *http.Request) {
}

if len(conditions) == completed {
status = "completed"
if action == "solve" {
status = "skipped"
} else {
status = "completed"
}
}

w.WriteHeader(http.StatusOK)
Expand Down

0 comments on commit 685be99

Please sign in to comment.