hbhj
This commit is contained in:
@@ -2620,14 +2620,14 @@ export class HostService {
|
||||
return await this.prisma.$transaction(async (tx) => {
|
||||
|
||||
const hostUserDetail = await tx.user.findFirst({
|
||||
where: { id: userId, isActive: true},
|
||||
where: { id: userId, isActive: true },
|
||||
select: {
|
||||
id: true,
|
||||
userRefNumber: true,
|
||||
}
|
||||
})
|
||||
|
||||
if(!hostUserDetail) {
|
||||
if (!hostUserDetail) {
|
||||
throw new ApiError(404, 'User not found');
|
||||
}
|
||||
const host = await tx.hostHeader.findFirst({
|
||||
@@ -2636,11 +2636,11 @@ export class HostService {
|
||||
if (!host) throw new ApiError(404, 'Host not found for the user');
|
||||
|
||||
const activityType = await tx.activityTypes.findUnique({
|
||||
where: { id: activityTypeXid },
|
||||
where: { id: activityTypeXid, isActive: true },
|
||||
include: {
|
||||
interests: true, // ✅ correct
|
||||
energyLevel: true, // ✅ this is correct already
|
||||
},
|
||||
interests: true, // ✅ correct
|
||||
energyLevel: true, // ✅ this is correct already
|
||||
},
|
||||
});
|
||||
if (!activityType) throw new ApiError(404, 'Activity type not found');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user