style(api): drop non-null assertion in refund amount
Replace `input.amount!` with `input.amount ?? Number(payment.amount)`, which is behaviour-identical (undefined amount = full refund = full amount) but satisfies lint/style/noNonNullAssertion. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -394,7 +394,7 @@ export class StripeService {
|
||||
paymentId: payment.id,
|
||||
userId: payment.userId,
|
||||
stripeRefundId: refund.id,
|
||||
amount: isFullRefund ? Number(payment.amount) : input.amount!,
|
||||
amount: input.amount ?? Number(payment.amount),
|
||||
isFullRefund,
|
||||
newStatus,
|
||||
currency: payment.currency,
|
||||
|
||||
Reference in New Issue
Block a user