Skip to content

Commit 9fa236f

Browse files
chore(api): drop zeroed ACUC price_credits from admin notification (firecrawl#3985)
The admin Slack message in sendNotificationInternal interpolated chunk.price_credits, which ACUC v49+ hardcodes to 0 (Autumn is the source of truth). Remove the meaningless "Number of credits in the plan: 0" clause, and with it the now-unused chunk param threaded through sendNotification / sendNotificationInternal (both dead apart from a test mock) and its import. Co-authored-by: firecrawl-spring[bot] <254786068+firecrawl-spring[bot]@users.noreply.github.com> Co-authored-by: micahstairs <micah@sideguide.dev>
1 parent 797b118 commit 9fa236f

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

apps/api/src/services/notification/email_notification.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { NotificationType } from "../../types";
88
import { logger } from "../../../src/lib/logger";
99
import { sendSlackWebhook } from "../alerts/slack";
1010
import { getNotificationString } from "./notification_string";
11-
import { AuthCreditUsageChunk } from "../../controllers/v1/types";
1211
import { redlock } from "../redlock";
1312
import { redisEvictConnection } from "../redis";
1413
import { trackEvent } from "../ledger/tracking";
@@ -80,7 +79,6 @@ export async function sendNotification(
8079
notificationType: NotificationType,
8180
startDateString: string | null,
8281
endDateString: string | null,
83-
chunk: AuthCreditUsageChunk,
8482
bypassRecentChecks: boolean = false,
8583
is_ledger_enabled: boolean = false,
8684
context: NotificationContext = {},
@@ -90,7 +88,6 @@ export async function sendNotification(
9088
notificationType,
9189
startDateString,
9290
endDateString,
93-
chunk,
9491
bypassRecentChecks,
9592
is_ledger_enabled,
9693
context,
@@ -210,7 +207,6 @@ async function sendNotificationInternal(
210207
notificationType: NotificationType,
211208
startDateString: string | null,
212209
endDateString: string | null,
213-
chunk: AuthCreditUsageChunk,
214210
bypassRecentChecks: boolean = false,
215211
is_ledger_enabled: boolean = false,
216212
context: NotificationContext = {},
@@ -334,7 +330,7 @@ async function sendNotificationInternal(
334330

335331
if (config.SLACK_ADMIN_WEBHOOK_URL && emails.length > 0) {
336332
sendSlackWebhook(
337-
`${getNotificationString(notificationType)}: Team ${team_id}, with email ${emails[0].email}. Number of credits in the plan: ${chunk.price_credits}`,
333+
`${getNotificationString(notificationType)}: Team ${team_id}, with email ${emails[0].email}`,
338334
false,
339335
config.SLACK_ADMIN_WEBHOOK_URL,
340336
).catch(error => {

0 commit comments

Comments
 (0)