Includes MFA-capable authentication, session and CSRF security, password recovery, listing lifecycle and ownership rules, inventory image metadata, local ImageStorage, migrations, tests, and implementation status documentation. Verification: npm test (62 passing) and integration suite (14 passing).
21 lines
637 B
JavaScript
21 lines
637 B
JavaScript
function toIsoString(value) {
|
|
return value instanceof Date ? value.toISOString() : value;
|
|
}
|
|
|
|
export function toAdminProductDto(product) {
|
|
return {
|
|
id: product.id,
|
|
sellerId: product.sellerId,
|
|
categoryId: product.categoryId,
|
|
name: product.name,
|
|
slug: product.slug,
|
|
description: product.description ?? null,
|
|
brand: product.brand ?? null,
|
|
setName: product.setName ?? null,
|
|
cardNumber: product.cardNumber ?? null,
|
|
eventName: product.eventName ?? null,
|
|
releaseYear: product.releaseYear ?? null,
|
|
createdAt: toIsoString(product.createdAt),
|
|
updatedAt: toIsoString(product.updatedAt),
|
|
};
|
|
} |