remove excess comments

This commit is contained in:
Michael Freno
2025-12-23 10:30:51 -05:00
parent 236555e41e
commit 8ca8e6f712
29 changed files with 1 additions and 242 deletions

View File

@@ -7,7 +7,6 @@ export async function GET(event: APIEvent) {
const code = url.searchParams.get("code");
const error = url.searchParams.get("error");
// Handle OAuth error (user denied access, etc.)
if (error) {
return new Response(null, {
status: 302,
@@ -15,7 +14,6 @@ export async function GET(event: APIEvent) {
});
}
// Missing authorization code
if (!code) {
return new Response(null, {
status: 302,
@@ -32,13 +30,11 @@ export async function GET(event: APIEvent) {
const result = await caller.auth.githubCallback({ code });
if (result.success) {
// Redirect to account page on success
return new Response(null, {
status: 302,
headers: { Location: result.redirectTo || "/account" }
});
} else {
// Redirect to login with error
return new Response(null, {
status: 302,
headers: { Location: "/login?error=auth_failed" }
@@ -47,7 +43,6 @@ export async function GET(event: APIEvent) {
} catch (error) {
console.error("GitHub OAuth callback error:", error);
// Handle specific TRPC errors
if (error && typeof error === "object" && "code" in error) {
const trpcError = error as { code: string; message?: string };

View File

@@ -7,7 +7,6 @@ export async function GET(event: APIEvent) {
const code = url.searchParams.get("code");
const error = url.searchParams.get("error");
// Handle OAuth error (user denied access, etc.)
if (error) {
return new Response(null, {
status: 302,
@@ -15,7 +14,6 @@ export async function GET(event: APIEvent) {
});
}
// Missing authorization code
if (!code) {
return new Response(null, {
status: 302,
@@ -32,13 +30,11 @@ export async function GET(event: APIEvent) {
const result = await caller.auth.googleCallback({ code });
if (result.success) {
// Redirect to account page on success
return new Response(null, {
status: 302,
headers: { Location: result.redirectTo || "/account" }
});
} else {
// Redirect to login with error
return new Response(null, {
status: 302,
headers: { Location: "/login?error=auth_failed" }
@@ -47,7 +43,6 @@ export async function GET(event: APIEvent) {
} catch (error) {
console.error("Google OAuth callback error:", error);
// Handle specific TRPC errors
if (error && typeof error === "object" && "code" in error) {
const trpcError = error as { code: string; message?: string };

View File

@@ -11,7 +11,6 @@ export async function GET(event: APIEvent) {
// Parse rememberMe parameter
const rememberMe = rememberMeParam === "true";
// Missing required parameters
if (!email || !token) {
return new Response(null, {
status: 302,
@@ -32,13 +31,11 @@ export async function GET(event: APIEvent) {
});
if (result.success) {
// Redirect to account page on success
return new Response(null, {
status: 302,
headers: { Location: result.redirectTo || "/account" },
});
} else {
// Redirect to login with error
return new Response(null, {
status: 302,
headers: { Location: "/login?error=auth_failed" },

View File

@@ -7,7 +7,6 @@ export async function GET(event: APIEvent) {
const email = url.searchParams.get("email");
const token = url.searchParams.get("token");
// Missing required parameters
if (!email || !token) {
return new Response(
`

View File

@@ -15,7 +15,6 @@ export async function POST() {
expires: new Date(0) // Set expiry to past date
});
// Redirect to home page
return new Response(null, {
status: 302,
headers: {