debugging and add image uploader to guild good

This commit is contained in:
2026-04-18 12:14:19 +03:30
parent ca494ee82a
commit 1a3a450960
16 changed files with 214 additions and 144 deletions
+2 -21
View File
@@ -1,6 +1,7 @@
import { ResponseMapper } from '@/common/response/response-mapper'
import { PrismaService } from '@/prisma/prisma.service'
import { Injectable } from '@nestjs/common'
import mapConsumerWithLicenseUtil from './utils/mapConsumerWithLicense.util'
@Injectable()
export class ConsumerService {
@@ -41,26 +42,6 @@ export class ConsumerService {
},
})
const { activated_licenses, ...rest } = consumer
const mappedData = {
...rest,
activated_licenses: activated_licenses.map(activatedLicense => {
const { license, ...rest } = activatedLicense
return {
...rest,
license: {
id: license.id,
partner: license.charged_license_transaction.partner,
},
}
}),
}
return ResponseMapper.single({
...consumer,
full_name: `${consumer?.first_name} ${consumer?.last_name}`,
activated_licenses: mappedData,
})
return ResponseMapper.single(mapConsumerWithLicenseUtil(consumer))
}
}