Skip to content

Commit 21beca8

Browse files
fix(cleanup): cleanup unused vars + webhook typo (#1259)
1 parent 0a86eda commit 21beca8

File tree

3 files changed

+1
-16
lines changed

3 files changed

+1
-16
lines changed

apps/sim/app/api/schedules/execute/route.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { userStats, workflow, workflowSchedule } from '@/db/schema'
2323
import { Executor } from '@/executor'
2424
import { Serializer } from '@/serializer'
2525
import { RateLimiter } from '@/services/queue'
26-
import type { SubscriptionPlan } from '@/services/queue/types'
2726
import { mergeSubblockState } from '@/stores/workflows/server-utils'
2827

2928
// Add dynamic export to prevent caching
@@ -112,8 +111,6 @@ export async function GET() {
112111
// Check rate limits for scheduled execution (checks both personal and org subscriptions)
113112
const userSubscription = await getHighestPrioritySubscription(workflowRecord.userId)
114113

115-
const subscriptionPlan = (userSubscription?.plan || 'free') as SubscriptionPlan
116-
117114
const rateLimiter = new RateLimiter()
118115
const rateLimitCheck = await rateLimiter.checkRateLimitWithSubscription(
119116
workflowRecord.userId,

apps/sim/app/api/webhooks/trigger/[path]/route.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import { executeWebhookJob } from '@/background/webhook-execution'
1414
import { db } from '@/db'
1515
import { webhook, workflow } from '@/db/schema'
1616
import { RateLimiter } from '@/services/queue'
17-
import type { SubscriptionPlan } from '@/services/queue/types'
1817

1918
const logger = createLogger('WebhookTriggerAPI')
2019

@@ -252,8 +251,6 @@ export async function POST(
252251
// Get user subscription for rate limiting (checks both personal and org subscriptions)
253252
const userSubscription = await getHighestPrioritySubscription(foundWorkflow.userId)
254253

255-
const subscriptionPlan = (subscriptionRecord?.plan || 'free') as SubscriptionPlan
256-
257254
// Check async rate limits (webhooks are processed asynchronously)
258255
const rateLimiter = new RateLimiter()
259256
const rateLimitCheck = await rateLimiter.checkRateLimitWithSubscription(

apps/sim/app/api/workflows/[id]/execute/route.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,7 @@ import { db } from '@/db'
2323
import { userStats } from '@/db/schema'
2424
import { Executor } from '@/executor'
2525
import { Serializer } from '@/serializer'
26-
import {
27-
RateLimitError,
28-
RateLimiter,
29-
type SubscriptionPlan,
30-
type TriggerType,
31-
} from '@/services/queue'
26+
import { RateLimitError, RateLimiter, type TriggerType } from '@/services/queue'
3227
import { mergeSubblockState } from '@/stores/workflows/server-utils'
3328

3429
const logger = createLogger('WorkflowExecuteAPI')
@@ -378,8 +373,6 @@ export async function GET(request: NextRequest, { params }: { params: Promise<{
378373
// Get user subscription (checks both personal and org subscriptions)
379374
const userSubscription = await getHighestPrioritySubscription(validation.workflow.userId)
380375

381-
const subscriptionPlan = (userSubscription?.plan || 'free') as SubscriptionPlan
382-
383376
const rateLimiter = new RateLimiter()
384377
const rateLimitCheck = await rateLimiter.checkRateLimitWithSubscription(
385378
validation.workflow.userId,
@@ -505,8 +498,6 @@ export async function POST(
505498
// Get user subscription (checks both personal and org subscriptions)
506499
const userSubscription = await getHighestPrioritySubscription(authenticatedUserId)
507500

508-
const subscriptionPlan = (userSubscription?.plan || 'free') as SubscriptionPlan
509-
510501
if (isAsync) {
511502
try {
512503
const rateLimiter = new RateLimiter()

0 commit comments

Comments
 (0)