File tree 3 files changed +7
-3
lines changed
app/(authenticated)/users/[id]
3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,11 @@ export default async function UserProfile({
68
68
{ ! isCompany ( userProfile . role ) &&
69
69
( isCompany ( user . role ) || isMember ( user . role ) ) && (
70
70
< List title = "Curriculum Vitae (CV)" >
71
- < CurriculumVitae user = { userProfile } session = { session } />
71
+ < CurriculumVitae
72
+ user = { userProfile }
73
+ session = { session }
74
+ currentUser = { userProfile . id === user . id }
75
+ />
72
76
</ List >
73
77
) }
74
78
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ export default function CurriculumVitae({
47
47
if ( file ) {
48
48
const url = await UserService . getDownloadURL (
49
49
session . cannonToken ,
50
- file . id ,
50
+ currentUser ? undefined : file . id ,
51
51
) ;
52
52
setDownloadURL ( url ) ;
53
53
} else {
Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ export const UserService = (() => {
153
153
154
154
const getDownloadURL = async (
155
155
cannonToken : string ,
156
- fileID : string
156
+ fileID ? : string ,
157
157
) : Promise < string | null > => {
158
158
try {
159
159
return `${ filesEndpoint } /${ fileID || "me" } /download?access_token=${ cannonToken } ` ;
You can’t perform that action at this time.
0 commit comments