tenseleyflow/shithub / 7c4dbb7

Browse files

Fix billing debug lint

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
7c4dbb7ddcb05c437eda6927b48ed550d02887b7
Parents
b7a3679
Tree
57c46fe

1 changed file

StatusFile+-
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
312312
 	debug.LastWebhookProcessedAt = formatOptionalTime(receipt.ProcessedAt)
313313
 	debug.LastWebhookAttempts = receipt.ProcessingAttempts
314314
 	debug.LastWebhookError = strings.TrimSpace(receipt.ProcessError)
315
-	if receipt.ProcessedAt.Valid {
315
+	switch {
316
+	case receipt.ProcessedAt.Valid:
316317
 		debug.LastWebhookStatus = "processed"
317
-	} else if debug.LastWebhookError != "" {
318
+	case debug.LastWebhookError != "":
318319
 		debug.LastWebhookStatus = "failed"
319
-	} else {
320
+	default:
320321
 		debug.LastWebhookStatus = "pending"
321322
 	}
322323
 	return debug