Refactor companyTypes seeding and enhance host retrieval to include user email address
This commit is contained in:
@@ -42,6 +42,7 @@ export const handler = safeHandler(async (
|
||||
message: 'Stepper information retrieved successfully',
|
||||
data: {
|
||||
stepper: host.stepper,
|
||||
emailAddress: host.user?.emailAddress || null,
|
||||
},
|
||||
}),
|
||||
};
|
||||
|
||||
@@ -85,7 +85,7 @@ export class HostService {
|
||||
async getHostIdByUserXid(user_xid: number) {
|
||||
const host = await this.prisma.hostHeader.findFirst({
|
||||
where: { userXid: user_xid },
|
||||
select: { id: true, companyName: true, countryXid: true, stepper: true },
|
||||
select: { id: true, companyName: true, countryXid: true, stepper: true, user: { select: { id: true, emailAddress: true }} },
|
||||
});
|
||||
return host;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user