File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,9 @@ export enum AnalyticsEvent {
119119 DOCS_SEARCH_INSUFFICIENT_CREDITS = 'api.docs_search_insufficient_credits' ,
120120 DOCS_SEARCH_ERROR = 'api.docs_search_error' ,
121121
122+ // Web - Ads API
123+ ADS_API_AUTH_ERROR = 'api.ads_auth_error' ,
124+
122125 // Common
123126 FLUSH_FAILED = 'common.flush_failed' ,
124127}
Original file line number Diff line number Diff line change 1- // Note: Using existing analytics events as placeholders since ads-specific events don't exist yet
1+ import { AnalyticsEvent } from '@codebuff/common/constants/analytics- events'
22import db from '@codebuff/internal/db'
33import * as schema from '@codebuff/internal/db/schema'
44import { NextResponse } from 'next/server'
@@ -78,7 +78,7 @@ export async function postAds(params: {
7878 logger : baseLogger ,
7979 loggerWithContext,
8080 trackEvent,
81- authErrorEvent : 'api.ads_auth_error' as any , // TODO: Add proper analytics event
81+ authErrorEvent : AnalyticsEvent . ADS_API_AUTH_ERROR ,
8282 } )
8383 if ( ! authed . ok ) return authed . response
8484
You can’t perform that action at this time.
0 commit comments