fetchAvatar() return default avatar if failed.
This commit is contained in:
BIN
srcs/requirements/svelte/api_front/public/img/default.png
Normal file
BIN
srcs/requirements/svelte/api_front/public/img/default.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 69 KiB |
@@ -13,6 +13,7 @@ export async function fetchAvatar(username: string)
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log("catch fetchAvatar: ", error);
|
||||
return `http://${process.env.WEBSITE_HOST}:${process.env.WEBSITE_PORT}/img/default.png`;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user