Skip to content

Commit

Permalink
ASdjflh
Browse files Browse the repository at this point in the history
  • Loading branch information
VictiniX888 committed Nov 9, 2024
1 parent bd9be96 commit 6df0199
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion libs/hackform-client/src/lib/resume-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,20 @@ export class HackformResumeUploadClient {
}

async getResumeUrl(userId: string): Promise<string> {
const res = await this.supabaseClient
.getClient()
.from('participants')
.select('resume')
.eq('id', userId)
.single();
if (res.error) {
return '';
}

const { data } = await this.supabaseClient
.getClient()
.storage.from(this.bucket)
.getPublicUrl(`${userId}/resume.pdf`);
.getPublicUrl(res.data.resume);

return data.publicUrl;
}
Expand Down

0 comments on commit 6df0199

Please sign in to comment.