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