mirror of
https://github.com/R0m1k3/PleinR.git
synced 2026-10-22 06:38:05 +02:00
Backend: edition image d'entete + logo des adherents
- Champs upload image d'entete (coverUrl) et logo (logoUrl) dans le formulaire d'edition d'un adherent (composant ImageField, fichier -> data-URL via hidden input) - updateMember persiste desormais coverUrl + logoUrl, et revalide la fiche publique /adherents/[id] - serverActions.bodySizeLimit a 4mb (les data-URL depassent la limite par defaut de 1mb) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
6ee7e44c1b
commit
b4d94f2115
4 files changed
+98
No files matched your search
@@ -141,6 +141,8 @@ export async function updateMember(formData: FormData) {
|
||||
phone: String(formData.get("phone") ?? "").trim() || null,
|
||||
website: String(formData.get("website") ?? "").trim() || null,
|
||||
memberSince: formData.get("memberSince") ? Number(formData.get("memberSince")) : null,
|
||||
coverUrl: String(formData.get("coverUrl") ?? "").trim() || null,
|
||||
logoUrl: String(formData.get("logoUrl") ?? "").trim() || null,
|
||||
tags: String(formData.get("tags") ?? "").trim() || null,
|
||||
hours: String(formData.get("hours") ?? "").trim() || null,
|
||||
status: String(formData.get("status") ?? "pending") as "active" | "pending",
|
||||
@@ -149,6 +151,7 @@ export async function updateMember(formData: FormData) {
|
||||
.where(eq(members.id, id));
|
||||
|
||||
revalidatePath("/backend/adherents");
|
||||
revalidatePath(`/adherents/${id}`);
|
||||
revalidatePath("/");
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user