Fix billing debug lint
Authored by
mfwolffe <wolffemf@dukes.jmu.edu>
- SHA
7c4dbb7ddcb05c437eda6927b48ed550d02887b7- Parents
-
b7a3679 - Tree
57c46fe
7c4dbb7
7c4dbb7ddcb05c437eda6927b48ed550d02887b7b7a3679
57c46fe| Status | File | + | - |
|---|---|---|---|
| M |
internal/web/handlers/orgs/billing_settings.go
|
4 | 3 |
internal/web/handlers/orgs/billing_settings.gomodified@@ -312,11 +312,12 @@ func (h *Handlers) billingDebugView(r *http.Request, state orgbilling.State) bil | ||
| 312 | 312 | debug.LastWebhookProcessedAt = formatOptionalTime(receipt.ProcessedAt) |
| 313 | 313 | debug.LastWebhookAttempts = receipt.ProcessingAttempts |
| 314 | 314 | debug.LastWebhookError = strings.TrimSpace(receipt.ProcessError) |
| 315 | - if receipt.ProcessedAt.Valid { | |
| 315 | + switch { | |
| 316 | + case receipt.ProcessedAt.Valid: | |
| 316 | 317 | debug.LastWebhookStatus = "processed" |
| 317 | - } else if debug.LastWebhookError != "" { | |
| 318 | + case debug.LastWebhookError != "": | |
| 318 | 319 | debug.LastWebhookStatus = "failed" |
| 319 | - } else { | |
| 320 | + default: | |
| 320 | 321 | debug.LastWebhookStatus = "pending" |
| 321 | 322 | } |
| 322 | 323 | return debug |