diff --git a/server.ts b/server.ts index ba82b3e..d90405a 100644 --- a/server.ts +++ b/server.ts @@ -1542,7 +1542,7 @@ app.put('/api/admin/courses/:id', authenticateToken, requireAdmin, async (req: A data: { ...(title !== undefined && { title }), ...(description !== undefined && { description }), - ...(thumbnail && { thumbnailUrl: thumbnail }), + ...(thumbnail !== undefined && { thumbnail }), ...(category !== undefined && { category }), ...(isLocked !== undefined && { isLocked: isLocked === true || isLocked === 'true' }), ...(price !== undefined && { price: Number(price) }),