removed excess comments

This commit is contained in:
Michael Freno
2026-01-04 11:14:54 -05:00
parent b81de6441b
commit 7e89e6dda2
68 changed files with 72 additions and 941 deletions

View File

@@ -22,11 +22,9 @@ export async function GET(event: APIEvent) {
}
try {
// Create tRPC caller to invoke the githubCallback procedure
const ctx = await createTRPCContext(event);
const caller = appRouter.createCaller(ctx);
// Call the GitHub callback handler
const result = await caller.auth.githubCallback({ code });
if (result.success) {

View File

@@ -22,11 +22,9 @@ export async function GET(event: APIEvent) {
}
try {
// Create tRPC caller to invoke the googleCallback procedure
const ctx = await createTRPCContext(event);
const caller = appRouter.createCaller(ctx);
// Call the Google callback handler
const result = await caller.auth.googleCallback({ code });
if (result.success) {

View File

@@ -5,14 +5,13 @@ export async function POST() {
"use server";
const event = getEvent()!;
// Clear the userIDToken cookie (the actual session cookie)
setCookie(event, "userIDToken", "", {
path: "/",
httpOnly: true,
secure: true, // Always enforce secure cookies
secure: true,
sameSite: "lax",
maxAge: 0, // Expire immediately
expires: new Date(0) // Set expiry to past date
maxAge: 0,
expires: new Date(0)
});
return new Response(null, {

View File

@@ -4,16 +4,11 @@ import { appRouter } from "~/server/api/root";
import { createTRPCContext } from "~/server/api/utils";
const handler = (event: APIEvent) => {
// adapts tRPC to fetch API style requests
return fetchRequestHandler({
// the endpoint handling the requests
endpoint: "/api/trpc",
// the request object
req: event.request,
// the router for handling the requests
router: appRouter,
// any arbitrary data that should be available to all actions
createContext: () => createTRPCContext(event),
createContext: () => createTRPCContext(event)
});
};