feat(admin): merge Site Settings and Wishlist into single Configurações panel
Single-wishlist apps no longer need two separate edit sections. Both siteTitle/homepageSubtext and wishlist fields now save together in one action from a unified Configurações card. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -81,6 +81,8 @@ export async function PATCH(
|
||||
const {
|
||||
name,
|
||||
description,
|
||||
price,
|
||||
currency,
|
||||
quantity,
|
||||
imageUrl,
|
||||
purchaseUrls,
|
||||
@@ -108,6 +110,8 @@ export async function PATCH(
|
||||
|
||||
if (name !== undefined) updateData.name = name;
|
||||
if (description !== undefined) updateData.description = description;
|
||||
if (price !== undefined) updateData.price = price != null ? Number(price) : null;
|
||||
if (currency !== undefined) updateData.currency = currency;
|
||||
if (quantity !== undefined) updateData.quantity = quantity;
|
||||
if (imageUrl !== undefined) updateData.imageUrl = imageUrl;
|
||||
if (purchaseUrls !== undefined) updateData.purchaseUrls = purchaseUrls;
|
||||
|
||||
@@ -82,6 +82,8 @@ export async function POST(
|
||||
const {
|
||||
name,
|
||||
description,
|
||||
price,
|
||||
currency,
|
||||
quantity,
|
||||
imageUrl,
|
||||
purchaseUrls,
|
||||
@@ -126,6 +128,8 @@ export async function POST(
|
||||
wishlistId: id,
|
||||
name,
|
||||
description: description || null,
|
||||
price: price != null ? Number(price) : null,
|
||||
currency: currency || 'BRL',
|
||||
quantity: quantity || 1,
|
||||
imageUrl: imageUrl || null,
|
||||
purchaseUrls: purchaseUrls || null,
|
||||
|
||||
Reference in New Issue
Block a user