feat(scheduling): pluggable captcha (Turnstile) on public booking
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Module } from '@nestjs/common'
|
||||
import { ConfigService } from '@nestjs/config'
|
||||
import { MongooseModule } from '@nestjs/mongoose'
|
||||
import { ScheduleModule } from '@nestjs/schedule'
|
||||
import { ThrottlerModule } from '@nestjs/throttler'
|
||||
@@ -12,6 +13,7 @@ import { SlotLock, SlotLockSchema } from '../schemas/slot-lock.schema.js'
|
||||
import { Tenant, TenantSchema } from '../schemas/tenant.schema.js'
|
||||
import { User, UserSchema } from '../schemas/user.schema.js'
|
||||
import { TenantsModule } from '../tenants/tenants.module.js'
|
||||
import { ABUSE_GUARD, abuseGuardFactory } from './abuse/abuse-guard.js'
|
||||
import { AvailabilityService } from './availability/availability.service.js'
|
||||
import { BookingsService } from './bookings/bookings.service.js'
|
||||
import { CalendarRetryWorker } from './bookings/calendar-retry.worker.js'
|
||||
@@ -61,6 +63,9 @@ import { StalwartCalendarModule } from './stalwart-calendar/stalwart-calendar.mo
|
||||
JmapMailer,
|
||||
BookingReminderWorker,
|
||||
CalendarRetryWorker,
|
||||
// Pluggable captcha guard for the public booking surface (Turnstile when
|
||||
// TURNSTILE_SECRET is set, otherwise a no-op).
|
||||
{ provide: ABUSE_GUARD, useFactory: abuseGuardFactory, inject: [ConfigService] },
|
||||
],
|
||||
})
|
||||
export class SchedulingModule {}
|
||||
|
||||
Reference in New Issue
Block a user