feat: POST /api/waitlist — backend endpoint for registration waitlist

- server.go: route registration (public, rate-limited)
- soc_handlers.go: handleWaitlist with email validation, input sanitization
- service.go: AddWaitlistEntry with audit trail + structured logging
- Frontend form at /register already submits to this endpoint
This commit is contained in:
DmitrL-dev 2026-03-24 15:46:59 +10:00
parent 29a0116125
commit 413fa8aa2c
3 changed files with 79 additions and 0 deletions

View file

@ -1436,3 +1436,17 @@ func (s *Service) ImportIncidents(incidents []peer.SyncIncident) (int, error) {
}
return imported, nil
}
// AddWaitlistEntry records a waitlist registration interest.
// Currently logs to the audit trail — DB persistence added when registration opens.
func (s *Service) AddWaitlistEntry(email, company, useCase string) {
if s.logger != nil {
s.logger.Record(audit.ModuleSOC, "WAITLIST:NEW",
fmt.Sprintf("email=%s company=%s use_case=%s", email, company, useCase))
}
slog.Info("waitlist entry recorded",
"email", email,
"company", company,
"use_case", useCase,
)
}