- {post.authorName?.charAt(0).toUpperCase()}
+
+
+ {#if post.authorImageUrl}
+

+ {:else}
+
+ {post.authorName?.charAt(0).toUpperCase()}
+
+ {/if}
+
@{post.authorName}
+
{new Date(post.createdAt).toLocaleDateString()}
+
+ {#key $sesionStore?.accessToken}
+
+
- {/if}
-
@{post.authorName}
-
{new Date(post.createdAt).toLocaleDateString()}
+ {/key}
{post.content}
diff --git a/src/routes/post/img/[idpost]/+server.ts b/src/routes/post/img/[idpost]/+server.ts
index 6f88bab..debec56 100644
--- a/src/routes/post/img/[idpost]/+server.ts
+++ b/src/routes/post/img/[idpost]/+server.ts
@@ -212,7 +212,8 @@ export const GET: RequestHandler = async ({ params, fetch, request }) => {
return new Response(new Uint8Array(pngBuffer), {
headers: {
'Content-Type': 'image/png',
- 'Cache-Control': 'public, max-age=31536000, immutable'
+ 'Cache-Control': 'public, max-age=31536000, immutable',
+ 'Content-Length': pngBuffer.length.toString()
}
});
};