Files
Joe Au-YeungandGitHub e5ebf7feb4 fix: signup (#25334)
* Handle Stripe logic in `paymentCallback`

* Remove endpoint

* Do not send email verification email if premium username

* Remove logic from verify-view

* Callback send verification email

* Add `create` method to `VerificationToken` repository

* Create `VerificationTokenService`

* Early return if payment failed

* Refactor token generation

* Add tests

* Type fixes

* Type fixes
2025-11-21 19:51:19 +00:00

40 lines
1.7 KiB
TypeScript

import publicProcedure from "../../procedures/publicProcedure";
import { router } from "../../trpc";
import { ZUserEmailVerificationRequiredSchema } from "./checkIfUserEmailVerificationRequired.schema";
import { ZMarkHostAsNoShowInputSchema } from "./markHostAsNoShow.schema";
import { event } from "./procedures/event";
import { ZSamlTenantProductInputSchema } from "./samlTenantProduct.schema";
import { ZSubmitRatingInputSchema } from "./submitRating.schema";
// things that unauthenticated users can query about themselves
export const publicViewerRouter = router({
countryCode: publicProcedure.query(async (opts) => {
const { default: handler } = await import("./countryCode.handler");
return handler(opts);
}),
submitRating: publicProcedure.input(ZSubmitRatingInputSchema).mutation(async (opts) => {
const { default: handler } = await import("./submitRating.handler");
return handler(opts);
}),
markHostAsNoShow: publicProcedure.input(ZMarkHostAsNoShowInputSchema).mutation(async (opts) => {
const { default: handler } = await import("./markHostAsNoShow.handler");
return handler(opts);
}),
samlTenantProduct: publicProcedure.input(ZSamlTenantProductInputSchema).mutation(async (opts) => {
const { default: handler } = await import("./samlTenantProduct.handler");
return handler(opts);
}),
event,
ssoConnections: publicProcedure.query(async () => {
const { default: handler } = await import("./ssoConnections.handler");
return handler();
}),
checkIfUserEmailVerificationRequired: publicProcedure
.input(ZUserEmailVerificationRequiredSchema)
.query(async (opts) => {
const { default: handler } = await import("./checkIfUserEmailVerificationRequired.handler");
return handler(opts);
}),
});