perf: Delete viewer.public.session tRPC endpoint (#23615)
* delete unused files * remove from router
This commit is contained in:
@@ -3,7 +3,6 @@ import { router } from "../../trpc";
|
||||
import { ZUserEmailVerificationRequiredSchema } from "./checkIfUserEmailVerificationRequired.schema";
|
||||
import { ZMarkHostAsNoShowInputSchema } from "./markHostAsNoShow.schema";
|
||||
import { event } from "./procedures/event";
|
||||
import { session } from "./procedures/session";
|
||||
import { ZSamlTenantProductInputSchema } from "./samlTenantProduct.schema";
|
||||
import { ZStripeCheckoutSessionInputSchema } from "./stripeCheckoutSession.schema";
|
||||
import { ZSubmitRatingInputSchema } from "./submitRating.schema";
|
||||
@@ -14,7 +13,6 @@ const namespaced = (s: string) => `${NAMESPACE}.${s}`;
|
||||
|
||||
// things that unauthenticated users can query about themselves
|
||||
export const publicViewerRouter = router({
|
||||
session,
|
||||
countryCode: publicProcedure.query(async (opts) => {
|
||||
const { default: handler } = await import("./countryCode.handler");
|
||||
return handler(opts);
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
import sessionMiddleware from "../../../middlewares/sessionMiddleware";
|
||||
import publicProcedure from "../../../procedures/publicProcedure";
|
||||
|
||||
const NAMESPACE = "publicViewer";
|
||||
|
||||
const namespaced = (s: string) => `${NAMESPACE}.${s}`;
|
||||
|
||||
export const session = publicProcedure.use(sessionMiddleware).query(async (opts) => {
|
||||
const { default: handler } = await import("../session.handler");
|
||||
return handler(opts);
|
||||
});
|
||||
@@ -1,13 +0,0 @@
|
||||
import type { Session } from "next-auth";
|
||||
|
||||
type SessionOptions = {
|
||||
ctx: {
|
||||
session: Session | null;
|
||||
};
|
||||
};
|
||||
|
||||
export const sessionHandler = async ({ ctx }: SessionOptions) => {
|
||||
return ctx.session;
|
||||
};
|
||||
|
||||
export default sessionHandler;
|
||||
@@ -1 +0,0 @@
|
||||
export {};
|
||||
Reference in New Issue
Block a user