Skip to content

Commit c8fa9b7

Browse files
committed
address comments
1 parent 05d3bab commit c8fa9b7

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

apps/sim/app/api/mcp/copilot/route.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,6 @@ function buildMcpServer(abortSignal?: AbortSignal): Server {
296296
abortSignal
297297
)
298298

299-
trackMcpCopilotCall(authResult.userId)
300-
301299
return result
302300
})
303301

@@ -388,10 +386,6 @@ export const DELETE = withRouteHandler(async (request: NextRequest) => {
388386
return NextResponse.json(createError(0, -32000, 'Method not allowed.'), { status: 405 })
389387
})
390388

391-
function trackMcpCopilotCall(userId: string): void {
392-
logger.debug('MCP copilot call tracked via request logs', { userId })
393-
}
394-
395389
async function handleToolsCall(
396390
params: { name: string; arguments?: Record<string, unknown> },
397391
userId: string,

apps/sim/lib/billing/webhooks/invoices.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -957,6 +957,9 @@ export async function handleInvoiceFinalized(event: Stripe.Event) {
957957
invoiceId: invoice.id,
958958
stripeSubscriptionId,
959959
})
960+
if (isEnterprise(sub.plan)) {
961+
await resetUsageForSubscription({ plan: sub.plan, referenceId: sub.referenceId })
962+
}
960963
return
961964
}
962965

0 commit comments

Comments
 (0)