diff --git a/prisma/seed.ts b/prisma/seed.ts index 291cd0c..71eaf9f 100644 --- a/prisma/seed.ts +++ b/prisma/seed.ts @@ -250,9 +250,9 @@ async function main() { }); await prisma.companyTypes.upsert({ - where: { companyTypeName: 'Private Limited, Public Limited' }, + where: { companyTypeName: 'Private Limited' }, update: {}, - create: { companyTypeName: 'Private Limited, Public Limited', displayOrder: 5 }, + create: { companyTypeName: 'Private Limited', displayOrder: 5 }, }); await prisma.companyTypes.upsert({ @@ -260,6 +260,12 @@ async function main() { update: {}, create: { companyTypeName: 'Non-Profit Organisation', displayOrder: 6 }, }); + + await prisma.companyTypes.upsert({ + where: { companyTypeName: 'Public Limited' }, + update: {}, + create: { companyTypeName: 'Public Limited', displayOrder: 7 }, + }); // ✅ Food Types await prisma.foodTypes.createMany({ diff --git a/src/modules/host/handlers/getStepper.ts b/src/modules/host/handlers/getStepper.ts index 38e3b63..45c00f9 100644 --- a/src/modules/host/handlers/getStepper.ts +++ b/src/modules/host/handlers/getStepper.ts @@ -42,6 +42,7 @@ export const handler = safeHandler(async ( message: 'Stepper information retrieved successfully', data: { stepper: host.stepper, + emailAddress: host.user?.emailAddress || null, }, }), }; diff --git a/src/modules/host/services/host.service.ts b/src/modules/host/services/host.service.ts index 405c68e..e7c6929 100644 --- a/src/modules/host/services/host.service.ts +++ b/src/modules/host/services/host.service.ts @@ -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; }