官网开发中 0803
This commit is contained in:
@@ -82,6 +82,9 @@ router.post('/api/www/sections', async (req: Request, res: Response) => {
|
||||
productId: b.product_id || null,
|
||||
layout: b.layout,
|
||||
theme: b.theme || 'light',
|
||||
overlineColor: b.overline_color || '',
|
||||
titleColor: b.title_color || '',
|
||||
bodyColor: b.body_color || '',
|
||||
bgType: b.bg_type || 'color',
|
||||
bgValue: b.bg_value || '',
|
||||
overlayEnabled: b.overlay_enabled ? 1 : 0,
|
||||
@@ -131,6 +134,9 @@ router.put('/api/www/sections/:id', async (req: Request, res: Response) => {
|
||||
await db.update(wwwSectionBlocks).set({
|
||||
layout: b.layout ?? existing.layout,
|
||||
theme: b.theme ?? existing.theme,
|
||||
overlineColor: b.overline_color ?? existing.overlineColor,
|
||||
titleColor: b.title_color ?? existing.titleColor,
|
||||
bodyColor: b.body_color ?? existing.bodyColor,
|
||||
bgType: b.bg_type ?? existing.bgType,
|
||||
bgValue: b.bg_value ?? existing.bgValue,
|
||||
overlayEnabled: b.overlay_enabled !== undefined ? (b.overlay_enabled ? 1 : 0) : existing.overlayEnabled,
|
||||
|
||||
Reference in New Issue
Block a user