mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-28 08:43:07 +08:00
perf: using head method to lower bandwidth use a bit
This commit is contained in:
parent
ec9430a84a
commit
5d518fbbee
1 changed files with 3 additions and 1 deletions
|
@ -1354,7 +1354,9 @@ export async function getDiscordAvatarUrl(
|
|||
try {
|
||||
const avatarUrl = `https://cdn.discordapp.com/avatars/${discordId}/${discordAvatar}.png?size=${discordAvatarSize}`;
|
||||
|
||||
const response = await fetch(avatarUrl);
|
||||
const response = await fetch(avatarUrl, {
|
||||
method: "HEAD",
|
||||
});
|
||||
if (!response.ok) {
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue