fix theme color
Some checks failed
Deploy Backend / deploy (push) Successful in 4m25s
Deploy Website / deploy (push) Failing after 2m45s

This commit is contained in:
Lee
2024-10-16 08:21:27 +01:00
parent cb7143ed3d
commit 1e8a9b9a59
5 changed files with 29 additions and 17 deletions

View File

@ -20,10 +20,10 @@ export function getImageUrl(originalUrl: string) {
*/
export const getAverageColor = async (src: string) => {
try {
return await ky.get<{ hex: string }>(`${config.siteApi}/image/averagecolor/${encodeURIComponent(src)}`).json();
return await ky.get<{ color: string }>(`${config.siteApi}/image/averagecolor/${encodeURIComponent(src)}`).json();
} catch {
return {
hex: Colors.primary,
color: Colors.primary,
};
}
};