This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

bug: fix no image being uploaded

+10 -7
+10 -7
src/features/takes/handlers/settings.ts
··· 193 193 const values = payload.view.state.values; 194 194 const userId = body.user.id; 195 195 196 - const file = [ 197 - values.project_banner?.project_banner_input?.files?.[0] 198 - ?.url_private_download as string, 199 - ]; 196 + const file = values.project_banner?.project_banner_input?.files?.[0] 197 + ?.url_private_download as string; 198 + 199 + console.log(file); 200 + 200 201 try { 201 - const projectBannerUrl = await deployToHackClubCDN(file).then( 202 - (res) => res.files[0]?.deployedUrl, 203 - ); 202 + const projectBannerUrl = file 203 + ? await deployToHackClubCDN([file]).then( 204 + (res) => res.files[0]?.deployedUrl, 205 + ) 206 + : undefined; 204 207 205 208 const hackatimeVersion = values.hackatime_version 206 209 ?.hackatime_version_input?.selected_option