mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
FIX PR Problems
This commit is contained in:
@@ -430,9 +430,10 @@ export default function AdminUserDetail() {
|
||||
|
||||
const handleUpdateSubscription = async (overrideAction?: string) => {
|
||||
if (!userId) return;
|
||||
const action = overrideAction || subAction;
|
||||
if ((action === 'extend' || action === 'shorten') && toNumber(subDays, 0) <= 0) return;
|
||||
setActionLoading(true);
|
||||
try {
|
||||
const action = overrideAction || subAction;
|
||||
const data: UpdateSubscriptionRequest = {
|
||||
action: action as UpdateSubscriptionRequest['action'],
|
||||
...(action === 'extend' || action === 'shorten' ? { days: toNumber(subDays, 30) } : {}),
|
||||
|
||||
Reference in New Issue
Block a user