chore: remove dead guest-register event route
The /api/events/[id]/guest-register endpoint has no production callers: it's superseded by tickets/purchase.post.js, which handles guest Member upsert via status:"guest" when body.createAccount is true. Drops the route file, its source-assertion tests, guestRegisterSchema, and its validation coverage.
This commit is contained in:
parent
5fb2f18cab
commit
3ba633cce2
4 changed files with 3 additions and 155 deletions
|
|
@ -12,7 +12,6 @@ import {
|
|||
waitlistDeleteSchema,
|
||||
cancelRegistrationSchema,
|
||||
checkRegistrationSchema,
|
||||
guestRegisterSchema,
|
||||
eventPaymentSchema,
|
||||
updateContributionSchema,
|
||||
seriesTicketPurchaseSchema,
|
||||
|
|
@ -25,6 +24,9 @@ import {
|
|||
adminMemberCreateSchema
|
||||
} from '../../../server/utils/schemas.js'
|
||||
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { resolve } from 'node:path'
|
||||
|
||||
// --- Helcim schemas ---
|
||||
|
||||
describe('helcimCreatePlanSchema', () => {
|
||||
|
|
@ -247,21 +249,6 @@ describe('waitlistSchema', () => {
|
|||
})
|
||||
})
|
||||
|
||||
describe('guestRegisterSchema', () => {
|
||||
it('accepts valid guest data', () => {
|
||||
const result = guestRegisterSchema.safeParse({
|
||||
name: 'Guest User',
|
||||
email: 'guest@example.com'
|
||||
})
|
||||
expect(result.success).toBe(true)
|
||||
})
|
||||
|
||||
it('rejects missing name', () => {
|
||||
const result = guestRegisterSchema.safeParse({ email: 'guest@example.com' })
|
||||
expect(result.success).toBe(false)
|
||||
})
|
||||
})
|
||||
|
||||
describe('eventPaymentSchema', () => {
|
||||
it('accepts valid payment data', () => {
|
||||
const result = eventPaymentSchema.safeParse({
|
||||
|
|
@ -459,9 +446,6 @@ describe('error text forwarding regression', () => {
|
|||
})
|
||||
})
|
||||
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { resolve } from 'node:path'
|
||||
|
||||
// --- validateBody migration coverage ---
|
||||
|
||||
describe('validateBody migration coverage', () => {
|
||||
|
|
@ -478,7 +462,6 @@ describe('validateBody migration coverage', () => {
|
|||
'events/[id]/waitlist.delete.js',
|
||||
'events/[id]/cancel-registration.post.js',
|
||||
'events/[id]/check-registration.post.js',
|
||||
'events/[id]/guest-register.post.js',
|
||||
'events/[id]/payment.post.js',
|
||||
'members/update-contribution.post.js',
|
||||
'series/[id]/tickets/purchase.post.js',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue