feat: establish auth listing and image vertical slices
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).
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
function toIsoString(value) {
|
||||
return value instanceof Date ? value.toISOString() : value;
|
||||
}
|
||||
|
||||
export function toAdminListingDto(listing) {
|
||||
return {
|
||||
id: listing.id,
|
||||
inventoryItemId: listing.inventoryItemId,
|
||||
productName: listing.productName,
|
||||
categoryId: listing.categoryId,
|
||||
conditionId: listing.conditionId,
|
||||
askingPriceMinor: listing.askingPriceMinor,
|
||||
imageCount: listing.imageCount,
|
||||
status: listing.status,
|
||||
notes: listing.notes ?? null,
|
||||
createdAt: toIsoString(listing.createdAt),
|
||||
updatedAt: toIsoString(listing.updatedAt),
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user