Prettier format pending files

This commit is contained in:
Builder.io 2025-11-16 07:12:36 +00:00
parent bdd584e96a
commit d9bd7eaf1e
6 changed files with 28 additions and 7 deletions

View file

@ -145,7 +145,10 @@ export async function getApplicationsForOpportunity(
export async function submitApplication(req: Request, userId: string) {
try {
const body = (await req.json()) as { opportunity_id?: string; cover_letter?: string };
const body = (await req.json()) as {
opportunity_id?: string;
cover_letter?: string;
};
const { opportunity_id, cover_letter } = body;
// Get creator ID for this user

View file

@ -110,7 +110,7 @@ export default async function handler(req: any, res: any) {
return res.status(500).json({ error: error.message });
}
const createdPost = (data?.[0] as any);
const createdPost = data?.[0] as any;
// Sync post to Discord feed webhook
try {

View file

@ -7,7 +7,10 @@ const supabase = createClient(supabaseUrl, supabaseServiceRole);
export async function linkDevConnectAccount(req: Request, userId: string) {
try {
const body = (await req.json()) as { devconnect_username?: string; devconnect_profile_url?: string };
const body = (await req.json()) as {
devconnect_username?: string;
devconnect_profile_url?: string;
};
const { devconnect_username, devconnect_profile_url } = body;
if (!devconnect_username) {

View file

@ -53,7 +53,12 @@ export default async function handler(req: VercelRequest, res: VercelResponse) {
throw new Error(`Discord API error: ${discordResponse.statusText}`);
}
const discordUser = (await discordResponse.json()) as { id: string; username: string; global_name?: string; avatar?: string };
const discordUser = (await discordResponse.json()) as {
id: string;
username: string;
global_name?: string;
avatar?: string;
};
const discord_id = discordUser.id;
const discord_username = discordUser.username;

View file

@ -54,7 +54,11 @@ export default async function handler(req: any, res: any) {
});
}
const tokenData = (await tokenResponse.json()) as { access_token: string; token_type: string; expires_in: number };
const tokenData = (await tokenResponse.json()) as {
access_token: string;
token_type: string;
expires_in: number;
};
const accessToken = tokenData.access_token;
if (!accessToken) {
@ -74,7 +78,10 @@ export default async function handler(req: any, res: any) {
return res.status(401).json({ error: "Invalid token" });
}
const discordUser = (await userResponse.json()) as { id: string; username: string };
const discordUser = (await userResponse.json()) as {
id: string;
username: string;
};
console.log(
"[Discord Token] Token exchange successful for user:",
discordUser.id,

View file

@ -10,7 +10,10 @@ export default async (req: Request) => {
try {
const supabase = getAdminClient();
const { primaryEmail, linkedEmail } = (await req.json()) as { primaryEmail?: string; linkedEmail?: string };
const { primaryEmail, linkedEmail } = (await req.json()) as {
primaryEmail?: string;
linkedEmail?: string;
};
if (!primaryEmail || !linkedEmail) {
return new Response(