feat: add public seller directory
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
"./product": "./product.js",
|
||||
"./public-listing": "./public-listing.js",
|
||||
"./public-inventory": "./public-inventory.js",
|
||||
"./public-product": "./public-product.js"
|
||||
"./public-product": "./public-product.js",
|
||||
"./public-seller": "./public-seller.js"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
function toIsoString(value) {
|
||||
return value instanceof Date ? value.toISOString() : value;
|
||||
}
|
||||
|
||||
export function toPublicSellerDto(seller) {
|
||||
return {
|
||||
id: seller.id,
|
||||
displayName: seller.displayName,
|
||||
createdAt: toIsoString(seller.createdAt),
|
||||
updatedAt: toIsoString(seller.updatedAt),
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user