diff --git a/api/src/app.module.ts b/api/src/app.module.ts index e47e65e..2910c3a 100644 --- a/api/src/app.module.ts +++ b/api/src/app.module.ts @@ -24,7 +24,6 @@ import { EventEmitterModule } from '@nestjs/event-emitter' @Injectable() export class LoggerMiddleware implements NestMiddleware { use(req: Request, res: Response, next: NextFunction) { - console.log('req.originalUrl: ', req.originalUrl) if (next) { next() } @@ -41,7 +40,7 @@ export class LoggerMiddleware implements NestMiddleware { ThrottlerModule.forRoot([ { ttl: 60000, - limit: 60, + limit: 500, }, ]), ScheduleModule.forRoot(), diff --git a/api/src/billing/billing.service.ts b/api/src/billing/billing.service.ts index 01e03c1..f4dbc50 100644 --- a/api/src/billing/billing.service.ts +++ b/api/src/billing/billing.service.ts @@ -530,7 +530,7 @@ export class BillingService { } if (user.emailVerifiedAt === null) { - console.error('canPerformAction: User email not verified') + console.warn('canPerformAction: User email not verified') throw new HttpException( { message: 'Please verify your email to continue', @@ -618,8 +618,8 @@ export class BillingService { } if (hasReachedLimit) { - console.error('canPerformAction: hasReachedLimit') - console.error( + console.warn('canPerformAction: hasReachedLimit') + console.warn( JSON.stringify({ userId, userEmail: user.email, diff --git a/api/src/gateway/queue/sms-queue.processor.ts b/api/src/gateway/queue/sms-queue.processor.ts index 844a002..ffd7262 100644 --- a/api/src/gateway/queue/sms-queue.processor.ts +++ b/api/src/gateway/queue/sms-queue.processor.ts @@ -55,7 +55,7 @@ export class SmsQueueProcessor { concurrency: 10, }) async handleSendSms(job: Job) { - this.logger.debug(`Processing send-sms job ${job.id}`) + // this.logger.debug(`Processing send-sms job ${job.id}`) const { deviceId, fcmMessages, smsBatchId } = job.data const device = await this.deviceModel @@ -84,9 +84,9 @@ export class SmsQueueProcessor { const response = await firebaseAdmin.messaging().sendEach(fcmMessages) - this.logger.debug( - `SMS Job ${job.id} completed, success: ${response.successCount}, failures: ${response.failureCount}`, - ) + // this.logger.debug( + // `SMS Job ${job.id}( smsBatchId: ${smsBatchId}) completed, success: ${response.successCount}, failures: ${response.failureCount}`, + // ) // Mark individual SMS records as failed when their FCM push failed for (let i = 0; i < response.responses.length; i++) { diff --git a/api/src/gateway/queue/sms-queue.service.ts b/api/src/gateway/queue/sms-queue.service.ts index 7948dea..d2a37e3 100644 --- a/api/src/gateway/queue/sms-queue.service.ts +++ b/api/src/gateway/queue/sms-queue.service.ts @@ -34,7 +34,7 @@ export class SmsQueueService { smsBatchId: string, delayMs?: number, ) { - this.logger.debug(`Adding send-sms job for batch ${smsBatchId}`) + // this.logger.debug(`Adding send-sms job for batch ${smsBatchId}`) // Split messages into batches of max smsBatchSize messages const batches = [] diff --git a/api/src/webhook/queue/webhook-queue.processor.ts b/api/src/webhook/queue/webhook-queue.processor.ts index 911e38b..7c28d2c 100644 --- a/api/src/webhook/queue/webhook-queue.processor.ts +++ b/api/src/webhook/queue/webhook-queue.processor.ts @@ -14,7 +14,7 @@ export class WebhookQueueProcessor { concurrency: 10, }) async handleWebhookDelivery(job: Job<{ notificationId: string }>) { - this.logger.debug(`Processing webhook delivery job ${job.id} for notification ${job.data.notificationId}`) + // this.logger.debug(`Processing webhook delivery job ${job.id} for notification ${job.data.notificationId}`) try { await this.webhookService.attemptWebhookDelivery(job.data.notificationId) diff --git a/api/src/webhook/queue/webhook-queue.service.ts b/api/src/webhook/queue/webhook-queue.service.ts index 765f25b..a6bd128 100644 --- a/api/src/webhook/queue/webhook-queue.service.ts +++ b/api/src/webhook/queue/webhook-queue.service.ts @@ -12,7 +12,7 @@ export class WebhookQueueService { ) {} async addWebhookDeliveryJob(notificationId: string) { - this.logger.debug(`Adding webhook delivery job for notification ${notificationId}`) + // this.logger.debug(`Adding webhook delivery job for notification ${notificationId}`) await this.webhookQueue.add( 'deliver-webhook',