FIX: Belonging Bugs
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user