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,
// belongingCode: belonging.belongingCode,
name: belonging.name,
category: belonging.category.englishName,
nativeCategory: belonging.category.nativeName,
category: belonging.category.englishName || '',
nativeCategory: belonging.category.nativeName || '',
imageUrl: belonging.mainImageUrls[0] || '',
documents: belonging.documentUrls,
description: belonging.description,
unit: belonging.unit,
tags: combinedTags,
coordinates: belonging.location.coordinates,
documents: belonging.documentUrls || [] ,
description: belonging.description || '',
unit: belonging.unit || '',
tags: combinedTags || '',
coordinates: belonging.location.coordinates || [0, 0],
createdAt: Math.floor(new Date(belonging.createdAt).getTime() / 1000), // Store as timestamp in seconds
}