feat: show rating

This commit is contained in:
2023-07-30 19:40:39 +02:00
parent c7279105ca
commit 0632ae05c1
12 changed files with 172 additions and 88 deletions

View File

@ -10,6 +10,7 @@ import * as cache from "@lib/cache/image.ts";
await initializeImageMagick();
async function getRemoteImage(image: string) {
console.log("[api/image] fetching", { image });
const sourceRes = await fetch(image);
if (!sourceRes.ok) {
return "Error retrieving image from URL.";
@ -131,8 +132,6 @@ export const handler = async (
mediaType: remoteImage.mediaType,
});
console.log("[api/image] stored image in cache");
return new Response(modifiedImage, {
headers: {
"Content-Type": remoteImage.mediaType,