15 lines
448 B
TypeScript
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 }
|
|
}
|