🐛 Fix subscription check

This commit is contained in:
2025-10-03 17:16:18 +08:00
parent d17c26a228
commit 85fefcf724

View File

@@ -79,15 +79,6 @@ public class SubscriptionService(
var couponData = await couponTask; var couponData = await couponTask;
// Validation checks // Validation checks
if (subscriptionInfo.RequiredLevel > 0)
{
if (profile is null)
throw new InvalidOperationException("Account profile was not found.");
if (profile.Level < subscriptionInfo.RequiredLevel)
throw new InvalidOperationException(
$"Account level must be at least {subscriptionInfo.RequiredLevel} to subscribe to {identifier}."
);
}
if (isFreeTrial && prevFreeTrial != null) if (isFreeTrial && prevFreeTrial != null)
throw new InvalidOperationException("Free trial already exists."); throw new InvalidOperationException("Free trial already exists.");