Files
alrahma_sunday_school_api/apps/api/src/modules/customers/customer.presenter.ts
T
2026-06-11 03:22:12 -04:00

15 lines
448 B
TypeScript

import { getProtectedCustomerLicenseImageUrl } from '../../lib/storage'
export function presentCustomer(customer: any) {
return {
...customer,
licenseImageUrl: customer?.licenseImageUrl
? getProtectedCustomerLicenseImageUrl(customer.id)
: null,
}
}
export function presentCustomerList(customers: any[], meta: { total: number; page: number; pageSize: number; totalPages: number }) {
return { data: customers, ...meta }
}