FIX: Belonging Bugs

This commit is contained in:
2025-05-03 18:51:52 +03:30
parent 1bcff0e73a
commit 39e909ee47
+7 -7
View File
@@ -109,14 +109,14 @@ const indexAllBelongings = async () => {
isActive: belonging.isActive, isActive: belonging.isActive,
// belongingCode: belonging.belongingCode, // belongingCode: belonging.belongingCode,
name: belonging.name, name: belonging.name,
category: belonging.category.englishName, category: belonging.category.englishName || '',
nativeCategory: belonging.category.nativeName, nativeCategory: belonging.category.nativeName || '',
imageUrl: belonging.mainImageUrls[0] || '', imageUrl: belonging.mainImageUrls[0] || '',
documents: belonging.documentUrls, documents: belonging.documentUrls || [] ,
description: belonging.description, description: belonging.description || '',
unit: belonging.unit, unit: belonging.unit || '',
tags: combinedTags, tags: combinedTags || '',
coordinates: belonging.location.coordinates, coordinates: belonging.location.coordinates || [0, 0],
createdAt: Math.floor(new Date(belonging.createdAt).getTime() / 1000), // Store as timestamp in seconds createdAt: Math.floor(new Date(belonging.createdAt).getTime() / 1000), // Store as timestamp in seconds
} }