Añadido el update para las imagenes

This commit is contained in:
2025-12-08 18:03:17 -03:00
parent 4c47da4567
commit 5c388cfb12
3 changed files with 112 additions and 27 deletions

View File

@@ -7,7 +7,7 @@ export async function updatePost(post: Post, callbackfn: Function, message: stri
try {
const formData = new FormData();
formData.append("content", post.content);
formData.append("imageUrl", post.imageUrl||"");
formData.append("image", post.image||"");
const req = await fetch(get(apiBase) + `/api/posts/${post.id}`, {
method: 'PUT',