feat: key status

This commit is contained in:
tbphp committed 2025-07-07 15:50:47 +08:00
1 parent 0f85381082
commit 3228cdad64
4 files changed
+11 -6

No files matched your search

+3 -3
View File
@@ -172,14 +172,14 @@ func (s *KeyCronService) processResults() {
var newErrorReason string
if result.Error != nil {
newStatus = "inactive"
newStatus = models.KeyStatusInvalid
newErrorReason = result.Error.Error()
} else {
if result.IsValid {
newStatus = "active"
newStatus = models.KeyStatusActive
newErrorReason = ""
} else {
newStatus = "inactive"
newStatus = models.KeyStatusInvalid
newErrorReason = "Validation returned false without a specific error."
}
}