Skip to content

Commit

Permalink
reset fail count after error window
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandosborne committed May 24, 2024
1 parent 8a9216a commit f83cf8d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion net/server/internal/api_setAdminAccess.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func SetAdminAccess(w http.ResponseWriter, r *http.Request) {
if res := tx.Clauses(clause.OnConflict{
Columns: []clause.Column{{Name: "config_id"}},
DoUpdates: clause.AssignmentColumns([]string{"num_value"}),
}).Create(&store.Config{ConfigID: CNFMFAFailedCount, NumValue: failedCount + 1}).Error; res != nil {
}).Create(&store.Config{ConfigID: CNFMFAFailedCount, NumValue: 1}).Error; res != nil {
return res
}
}
Expand Down
2 changes: 1 addition & 1 deletion net/server/internal/api_setAdminMFAuth.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func SetAdminMFAuth(w http.ResponseWriter, r *http.Request) {
if res := tx.Clauses(clause.OnConflict{
Columns: []clause.Column{{Name: "config_id"}},
DoUpdates: clause.AssignmentColumns([]string{"num_value"}),
}).Create(&store.Config{ConfigID: CNFMFAFailedCount, NumValue: failedCount + 1}).Error; res != nil {
}).Create(&store.Config{ConfigID: CNFMFAFailedCount, NumValue: 1}).Error; res != nil {
return res
}
}
Expand Down

0 comments on commit f83cf8d

Please sign in to comment.