Prettier format pending files
This commit is contained in:
parent
bdd584e96a
commit
d9bd7eaf1e
6 changed files with 28 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in a new issue