This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
export function toAdminProviderMappingDto(mapping) {
|
||||
return {
|
||||
id: mapping.id,
|
||||
productId: mapping.productId,
|
||||
providerId: mapping.providerId,
|
||||
mappingType: mapping.mappingType,
|
||||
externalIdentifier: mapping.externalIdentifier ?? null,
|
||||
searchQuery: mapping.searchQuery ?? null,
|
||||
sourceUrl: mapping.sourceUrl ?? null,
|
||||
status: mapping.status,
|
||||
metadata: mapping.metadata ?? {},
|
||||
createdAt: mapping.createdAt instanceof Date ? mapping.createdAt.toISOString() : mapping.createdAt,
|
||||
updatedAt: mapping.updatedAt instanceof Date ? mapping.updatedAt.toISOString() : mapping.updatedAt,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user