Skip to content

Commit

Permalink
more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
artlu99 committed Nov 3, 2024
1 parent 9527541 commit ebc4caa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions functions/getSassyHashes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ const getFid = async (privyAuthToken: string, env: Env): Promise<number> => {

try {
const user = await privy.getUser({ idToken: privyAuthToken });
console.log("Privy User:", user);
console.log('Privy User:', user);

return user?.farcaster?.fid;
} catch (error) {
console.error(`Token verification failed with error ${error}.`);
Expand Down Expand Up @@ -63,6 +63,7 @@ export const onRequestPost: PagesFunction<Env> = async (context) => {
const { env, request } = context;
const js = (await request.json()) as SassyHashRequest;
const { privyAuthToken, castHash } = js;
console.log('js:', js);

const fid = await getFid(privyAuthToken, env);
if (!fid) return new Response(JSON.stringify({ error: 'Failed to fetch Farcaster FID' }), { status: 500 });
Expand Down

0 comments on commit ebc4caa

Please sign in to comment.